Skip to content

Commit

Permalink
Add Subscribed switch
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Feb 15, 2024
1 parent 1ce6fd1 commit 9bfd445
Show file tree
Hide file tree
Showing 13 changed files with 1,401 additions and 15 deletions.
10 changes: 5 additions & 5 deletions api/lib/api/mission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ export default class {
*/
async subscribe(name: string, query: {
uid: string;
password: string;
secago: number;
start: string;
end: string;
password?: string;
secago?: number;
start?: string;
end?: string;

[key: string]: unknown;
}) {
Expand Down Expand Up @@ -135,7 +135,7 @@ export default class {
*/
async unsubscribe(name: string, query: {
uid: string;
disconnectOnly: string;
disconnectOnly?: string;

[key: string]: unknown;
}) {
Expand Down
3 changes: 2 additions & 1 deletion api/lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export const ProfileSubscription = pgTable('profile_subscriptions', {
username: text('username').notNull(),
created: timestamp('created', { withTimezone: true }).notNull().default(sql`Now()`),
updated: timestamp('updated', { withTimezone: true }).notNull().default(sql`Now()`),
mission: text('mission').notNull()
mission: text('mission').notNull(),
guid: text('guid').notNull()
});

export const ProfileChat = pgTable('profile_chats', {
Expand Down
1 change: 1 addition & 0 deletions api/migrations/0011_tiny_miracleman.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "profile_subscriptions" ADD COLUMN "guid" text NOT NULL;
Loading

0 comments on commit 9bfd445

Please sign in to comment.