use service

This commit is contained in:
counterweight 2025-02-10 00:01:38 +01:00
parent c9e76bbfd6
commit c8ddd96743
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 25 additions and 16 deletions

View file

@ -0,0 +1,18 @@
const AppInvite = require('../models/AppInvite');
async function appInviteExists(inviteUuid) {
const invite = await AppInvite.findOne({ where: { uuid: inviteUuid } });
if (invite) {
return true;
}
return false;
}
async function getInvite(inviteUuid) {
const invite = await AppInvite.findOne({ where: { uuid: inviteUuid } });
return invite;
}
exports.appInviteExists = appInviteExists;
exports.getInvite = getInvite;