Fix error 500 if token not found

This commit is contained in:
nicolas.dorier 2018-12-07 13:48:39 +09:00
parent d53c987f2e
commit 93645b2fbe

View file

@ -242,6 +242,8 @@ namespace BTCPayServer.Authentication
using (var ctx = _Factory.CreateContext())
{
var token = await ctx.PairedSINData.FindAsync(tokenId);
if (token == null)
return null;
return CreateTokenEntity(token);
}
}