Filter crew events to only be visible for crew
This commit is contained in:
parent
13f344472e
commit
4806343250
9 changed files with 96 additions and 17 deletions
|
@ -2,6 +2,7 @@ import {
|
|||
readAccounts, readSessions, readSubscriptions,
|
||||
writeAccounts, writeSessions, writeSubscriptions,
|
||||
} from "~/server/database";
|
||||
import { cancelAccountStreams } from "~/server/streams";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const accountSession = await requireAccountSession(event);
|
||||
|
@ -24,6 +25,7 @@ export default defineEventHandler(async (event) => {
|
|||
}
|
||||
return true;
|
||||
});
|
||||
cancelAccountStreams(accountSession.accountId);
|
||||
await writeSessions(sessions);
|
||||
await deleteCookie(event, "session");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue