account settings actions, account deletion left

This commit is contained in:
m5r
2022-05-14 14:43:45 +02:00
parent 98b89ae0f7
commit 48b3604116
17 changed files with 314 additions and 239 deletions

View File

@ -9,7 +9,7 @@ import authenticator from "./authenticator.server";
import { AuthenticationError } from "./errors";
import { commitSession, destroySession, getSession } from "./session.server";
export type SessionOrganization = Pick<Organization, "name" | "id"> & { role: MembershipRole };
export type SessionOrganization = Pick<Organization, "id"> & { role: MembershipRole };
export type SessionUser = Omit<User, "hashedPassword"> & {
organizations: SessionOrganization[];
};
@ -38,7 +38,7 @@ export async function login({ form }: FormStrategyVerifyParams): Promise<Session
memberships: {
select: {
organization: {
select: { name: true, id: true },
select: { id: true },
},
role: true,
},
@ -150,7 +150,7 @@ export async function refreshSessionData(request: Request) {
memberships: {
select: {
organization: {
select: { name: true, id: true },
select: { id: true },
},
role: true,
},