-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(BE) Add API for Retrieving Workspace List (#59)
* Add service for retrieving a workspace * Add controller for retrieving a workspace * Change service for retrieving a workspace * Change controller for retrieving workspaces
- Loading branch information
Showing
6 changed files
with
106 additions
and
25 deletions.
There are no files selected for viewing
13 changes: 2 additions & 11 deletions
13
backend/src/workspaces/types/create-workspace-response.type.ts
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 |
---|---|---|
@@ -1,12 +1,3 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { WorkspaceDomain } from "./workspace-domain.type"; | ||
|
||
export class CreateWorkspaceResponse { | ||
@ApiProperty({ type: String, description: "ID of new workspace" }) | ||
id: string; | ||
@ApiProperty({ type: String, description: "Title of new workspace" }) | ||
title: string; | ||
@ApiProperty({ type: Date, description: "Created date of new workspace" }) | ||
createdAt: Date; | ||
@ApiProperty({ type: Date, description: "Updated date of new workspace" }) | ||
updatedAt: Date; | ||
} | ||
export class CreateWorkspaceResponse extends WorkspaceDomain {} |
13 changes: 2 additions & 11 deletions
13
backend/src/workspaces/types/find-workspace-response.type.ts
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 |
---|---|---|
@@ -1,12 +1,3 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { WorkspaceDomain } from "./workspace-domain.type"; | ||
|
||
export class FindWorkspaceResponse { | ||
@ApiProperty({ type: String, description: "ID of found workspace" }) | ||
id: string; | ||
@ApiProperty({ type: String, description: "Title of found workspace" }) | ||
title: string; | ||
@ApiProperty({ type: Date, description: "Created date of found workspace" }) | ||
createdAt: Date; | ||
@ApiProperty({ type: Date, description: "Updated date of found workspace" }) | ||
updatedAt: Date; | ||
} | ||
export class FindWorkspaceResponse extends WorkspaceDomain {} |
10 changes: 10 additions & 0 deletions
10
backend/src/workspaces/types/find-workspaces-response.type.ts
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,10 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { WorkspaceDomain } from "./workspace-domain.type"; | ||
|
||
export class FindWorkspacesResponse { | ||
@ApiProperty({ type: [WorkspaceDomain], description: "List of found workspaces" }) | ||
workspaces: Array<WorkspaceDomain>; | ||
|
||
@ApiProperty({ type: String, description: "The ID of last workspace" }) | ||
cursor: string | null; | ||
} |
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,12 @@ | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
|
||
export class WorkspaceDomain { | ||
@ApiProperty({ type: String, description: "ID of the workspace" }) | ||
id: string; | ||
@ApiProperty({ type: String, description: "Title of the workspace" }) | ||
title: string; | ||
@ApiProperty({ type: Date, description: "Created date of the workspace" }) | ||
createdAt: Date; | ||
@ApiProperty({ type: Date, description: "Updated date of the workspace" }) | ||
updatedAt: Date; | ||
} |
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