3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Dashboard styling; don't allow login if you have no guild perms; allow logging out

This commit is contained in:
Dragory 2019-07-22 00:11:24 +03:00
parent a517ca3906
commit 0f724fc9bd
9 changed files with 132 additions and 35 deletions

View file

@ -75,4 +75,16 @@ export class ApiLogins extends BaseRepository {
return `${loginId}.${token}`;
}
expireApiKey(apiKey) {
const [loginId, token] = apiKey.split(".");
if (!loginId || !token) return;
return this.apiLogins.update(
{ id: loginId },
{
expires_at: moment().format(DBDateFormat),
},
);
}
}