casting to avoid calamity with signedness memes

This commit is contained in:
shockrah 2020-11-16 22:56:56 -08:00
parent aa9c515b95
commit a9fafa8fdc

View File

@ -20,6 +20,9 @@ impl FromDB<Invite, bool> for Invite {
type Row = Option<(BigInt, Option<BigInt>, bool)>;
async fn get(p: &Pool, id: UBigInt) -> Response<Self> {
// NOTE: cast is required for this as `id` is used as unix timestamp
let id: BigInt = id as BigInt;
if id <= 0 {
return Response::Empty;
}