Rename AcountSession to ServerSession
All checks were successful
/ build (push) Successful in 1m12s
/ deploy (push) Successful in 16s

Start the work of clearly distingushing client side types, server side
types and types shared over the API by renaming "AccountSession" and
"Session" names used on the server to "ServerSession".
This commit is contained in:
Hornwitser 2025-06-09 16:51:05 +02:00
parent 16191a8dd2
commit 251e83f640
15 changed files with 39 additions and 36 deletions

View file

@ -2,7 +2,7 @@ import { readAccounts, writeAccounts, nextAccountId } from "~/server/database";
import { Account } from "~/shared/types/account";
export default defineEventHandler(async (event) => {
let session = await getAccountSession(event);
let session = await getServerSession(event);
if (session) {
throw createError({
status: 409,
@ -49,5 +49,5 @@ export default defineEventHandler(async (event) => {
accounts.push(account);
await writeAccounts(accounts);
await setAccountSession(event, account.id);
await setServerSession(event, account.id);
})