forked from CS3219-AY2425S1/cs3219-ay2425s1-project-g03
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug for collab (CS3219-AY2425S1#92)
* Fix bug - Previously, on successful forfeit call, we still set a new entry in the yjs doc. This causes the yjs doc to be reintialise when both users has already forfeited * Refactoring in Collaboration Service: - Refactor comments in collab service - Move interface from controller folder to types folder - Refactor README.md - Remove unused variable in queue: MATCH_FOUND * Update message for when user agrees to submit --------- Co-authored-by: KhoonSun47 <[email protected]>
- Loading branch information
1 parent
82f1389
commit 1a61971
Showing
14 changed files
with
133 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { ObjectId } from 'mongodb'; | ||
|
||
/** | ||
* @fileoverview Types for the collaboration service. | ||
*/ | ||
|
||
/** | ||
* User interface. | ||
*/ | ||
export interface User { | ||
id: string; | ||
username: string; | ||
requestId: string; | ||
isForfeit?: boolean; | ||
} | ||
|
||
/** | ||
* Room interface. | ||
*/ | ||
export interface Room { | ||
_id: ObjectId; | ||
users: User[]; | ||
question: Question; | ||
createdAt: Date; | ||
room_status: boolean; | ||
} | ||
|
||
/** | ||
* Question difficulty enum. | ||
*/ | ||
export enum Difficulty { | ||
Easy = 'Easy', | ||
Medium = 'Medium', | ||
Hard = 'Hard', | ||
} | ||
|
||
/** | ||
* Question interface. | ||
*/ | ||
export interface Question { | ||
id: number; | ||
description: string; | ||
difficulty: Difficulty; | ||
title: string; | ||
topics?: string[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters