Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
BK2004 committed Oct 23, 2024
1 parent 5529a6e commit 19b9187
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/app/manage/[clubId]/edit/officers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function Page({
name: officer.userMetadata.firstName + ' ' + officer.userMetadata.lastName,
locked: officer.memberType == 'President' || role == 'Officer',
position: officer.memberType as 'President' | 'Officer',
title: "", // TODO: link from officers table
title: '', // TODO: link from officers table
}));

return (
Expand Down
2 changes: 1 addition & 1 deletion src/server/api/routers/clubEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const clubEditRouter = createTRPCRouter({
)
.onConflictDoUpdate({
target: [userMetadataToClubs.userId, userMetadataToClubs.clubId],
set: { memberType: 'Officer' as const},
set: { memberType: 'Officer' as const },
where: eq(userMetadataToClubs.memberType, 'Member'),
});
}),
Expand Down
32 changes: 16 additions & 16 deletions src/server/db/schema/officers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import { pgTable, text, boolean, primaryKey } from 'drizzle-orm/pg-core';
import { club } from './club';

export const officers = pgTable(
'officers',
{
id: text('id').notNull(),
clubId: text('club_id')
.notNull()
.references(() => club.id),
name: text('name').notNull(),
position: text('position').notNull(),
image: text('image').default('/nebula-logo.png').notNull(),
isPresident: boolean('is_president').default(false).notNull(),
},
(table) => ({
pk: primaryKey(table.clubId, table.id),
})
'officers',
{
id: text('id').notNull(),
clubId: text('club_id')
.notNull()
.references(() => club.id),
name: text('name').notNull(),
position: text('position').notNull(),
image: text('image').default('/nebula-logo.png').notNull(),
isPresident: boolean('is_president').default(false).notNull(),
},
(table) => ({
pk: primaryKey(table.clubId, table.id),
}),
);

export const officersToClubs = relations(officers, ({ one }) => ({
club: one(club, { fields: [officers.clubId], references: [club.id] }),
}));
club: one(club, { fields: [officers.clubId], references: [club.id] }),
}));

0 comments on commit 19b9187

Please sign in to comment.