Skip to content

Commit

Permalink
add enums
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Apr 23, 2024
1 parent eb86979 commit f7b6f3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __tests__/unit/models/platform.model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Platform model', () => {
let platform: IPlatform;
beforeEach(() => {
platform = {
name: 'Discord',
name: 'google',
community: new Types.ObjectId(),
metadata: {
guildId: 'guildId',
Expand Down
2 changes: 1 addition & 1 deletion src/config/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const tokenTypes = {
TWITTER_ACCESS: 'twitter_access',
TWITTER_REFRESH: 'twitter_refresh',
GOOGLE_ACCESS: 'google_access',
GOOGLE_REFRESH: 'google_refresh'
GOOGLE_REFRESH: 'google_refresh',
};
4 changes: 2 additions & 2 deletions src/interfaces/Platfrom.interface.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { type Model, type Types } from 'mongoose';

export interface IPlatform {
name: string;
name: 'google' | 'discord' | 'twitter';
community: Types.ObjectId;
metadata?: Record<string, any>; // dynamic object since structure can change
disconnectedAt?: Date | null;
connectedAt?: Date | null;
}

export interface IPlatformUpdateBody {
name?: string;
name?: 'google' | 'discord' | 'twitter';
community?: Types.ObjectId;
metadata?: Record<string, any>;
disconnectedAt?: Date | null;
Expand Down

0 comments on commit f7b6f3b

Please sign in to comment.