mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-12-03 05:10:04 +01:00
Require api version header for sign out
This commit is contained in:
1 parent
661dc4e654
commit
c85359f4a3
1 file changed
+2
-2
@@ -7,7 +7,7 @@ import { MINUTE } from '../../common/constants';
|
||||
import { fromNow, hasFlag, includes, isError, uniqById } from '../../common/utils';
|
||||
import { BannedMuted, Settings, ServerConfig, AccountFlags, ServerLiveSettings } from '../../common/adminInterfaces';
|
||||
import { Account, IAccount, Origin, IOrigin } from '../db';
|
||||
import { limit, auth as authRequest, wrap } from '../requestUtils';
|
||||
import { limit, auth as authRequest, wrap, hash } from '../requestUtils';
|
||||
import { CreateAccountOptions, findOrCreateAccount, SuspiciousCheckers, getAccountAlertMessage } from '../accountUtils';
|
||||
import { createReporter, createFromRequest } from '../reporter';
|
||||
import { logger, logServer, system } from '../logger';
|
||||
@@ -292,7 +292,7 @@ export function authRoutes(
|
||||
});
|
||||
});
|
||||
|
||||
app.post('/sign-out', wrap(server, async req => {
|
||||
app.post('/sign-out', hash, wrap(server, async req => {
|
||||
kickCurrentUser(req);
|
||||
await new Promise<void>(resolve => req.logout(error => {
|
||||
if (error) {
|
||||
|
||||
Reference in new issue
Block a user