Skip to content

Commit

Permalink
アクセストークンを無効化したらストリーミングを切断するように
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Jul 12, 2021
1 parent 93d9df0 commit 8a96d2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/api/endpoints/i/revoke-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import define from '../../define';
//import { AccessTokens } from '../../../../models';
import ID, { transform } from '../../../../misc/cafy-id';
import AccessToken from '../../../../models/access-token';
import { publishTerminate } from '../../../../services/server-event';

export const meta = {
requireCredential: true as const,
Expand All @@ -26,4 +27,7 @@ export default define(meta, async (ps, user) => {
_id: ps.tokenId,
userId: user._id
});

// Terminate streaming
publishTerminate(user._id);
});

0 comments on commit 8a96d2b

Please sign in to comment.