Skip to content

Commit

Permalink
feat: retrieving db and api
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonNotJson committed Jan 2, 2023
1 parent 18e89f0 commit 1e0b50b
Show file tree
Hide file tree
Showing 7 changed files with 527 additions and 527 deletions.
252 changes: 126 additions & 126 deletions lib/configs/api-gateway/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,134 +377,134 @@ export const courseReviewPatchReqSchema: apigw.JsonSchema = {
required: ['data'],
};

// export const forumThreadGetRespSchema: apigw.JsonSchema = {
// schema: apigw.JsonSchemaVersion.DRAFT7,
// type: apigw.JsonSchemaType.OBJECT,
// properties: {
// success: {
// type: apigw.JsonSchemaType.BOOLEAN,
// },
// data: {
// type: apigw.JsonSchemaType.ARRAY,
// items: {
// type: apigw.JsonSchemaType.OBJECT,
// properties: {
// univ_id: {
// type: apigw.JsonSchemaType.INTEGER,
// },
// board_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// updated_at: {
// type: apigw.JsonSchemaType.STRING,
// },
// created_at: {
// type: apigw.JsonSchemaType.STRING,
// },
// tag_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// group_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// thread_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// title: {
// type: apigw.JsonSchemaType.STRING,
// },
// body: {
// type: apigw.JsonSchemaType.STRING,
// },
// views: {
// type: apigw.JsonSchemaType.INTEGER,
// },
// mod: {
// type: apigw.JsonSchemaType.BOOLEAN,
// },
// },
// required: [
// 'univ_id',
// 'board_id',
// 'updated_at',
// 'created_at',
// 'tag_id',
// 'group_id',
// 'thread_id',
// 'title',
// 'body',
// 'views',
// 'mod',
// ],
// },
// },
// message: {
// type: apigw.JsonSchemaType.STRING,
// },
// },
// required: ['success', 'data', 'message'],
// };
export const forumThreadGetRespSchema: apigw.JsonSchema = {
schema: apigw.JsonSchemaVersion.DRAFT7,
type: apigw.JsonSchemaType.OBJECT,
properties: {
success: {
type: apigw.JsonSchemaType.BOOLEAN,
},
data: {
type: apigw.JsonSchemaType.ARRAY,
items: {
type: apigw.JsonSchemaType.OBJECT,
properties: {
univ_id: {
type: apigw.JsonSchemaType.INTEGER,
},
board_id: {
type: apigw.JsonSchemaType.STRING,
},
updated_at: {
type: apigw.JsonSchemaType.STRING,
},
created_at: {
type: apigw.JsonSchemaType.STRING,
},
tag_id: {
type: apigw.JsonSchemaType.STRING,
},
group_id: {
type: apigw.JsonSchemaType.STRING,
},
thread_id: {
type: apigw.JsonSchemaType.STRING,
},
title: {
type: apigw.JsonSchemaType.STRING,
},
body: {
type: apigw.JsonSchemaType.STRING,
},
views: {
type: apigw.JsonSchemaType.INTEGER,
},
mod: {
type: apigw.JsonSchemaType.BOOLEAN,
},
},
required: [
'univ_id',
'board_id',
'updated_at',
'created_at',
'tag_id',
'group_id',
'thread_id',
'title',
'body',
'views',
'mod',
],
},
},
message: {
type: apigw.JsonSchemaType.STRING,
},
},
required: ['success', 'data', 'message'],
};

// export const forumThreadPostReqSchema: apigw.JsonSchema = {
// schema: apigw.JsonSchemaVersion.DRAFT7,
// type: apigw.JsonSchemaType.OBJECT,
// properties: {
// data: {
// type: apigw.JsonSchemaType.OBJECT,
// properties: {
// univ_id: {
// type: apigw.JsonSchemaType.INTEGER,
// },
// board_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// tag_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// group_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// title: {
// type: apigw.JsonSchemaType.STRING,
// },
// body: {
// type: apigw.JsonSchemaType.STRING,
// },
// },
// required: ['univ_id', 'board_id', 'tag_id', 'group_id', 'title', 'body'],
// },
// },
// required: ['data'],
// };
export const forumThreadPostReqSchema: apigw.JsonSchema = {
schema: apigw.JsonSchemaVersion.DRAFT7,
type: apigw.JsonSchemaType.OBJECT,
properties: {
data: {
type: apigw.JsonSchemaType.OBJECT,
properties: {
univ_id: {
type: apigw.JsonSchemaType.INTEGER,
},
board_id: {
type: apigw.JsonSchemaType.STRING,
},
tag_id: {
type: apigw.JsonSchemaType.STRING,
},
group_id: {
type: apigw.JsonSchemaType.STRING,
},
title: {
type: apigw.JsonSchemaType.STRING,
},
body: {
type: apigw.JsonSchemaType.STRING,
},
},
required: ['univ_id', 'board_id', 'tag_id', 'group_id', 'title', 'body'],
},
},
required: ['data'],
};

// export const forumThreadPatchReqSchema: apigw.JsonSchema = {
// schema: apigw.JsonSchemaVersion.DRAFT7,
// type: apigw.JsonSchemaType.OBJECT,
// properties: {
// data: {
// type: apigw.JsonSchemaType.OBJECT,
// properties: {
// board_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// tag_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// thread_id: {
// type: apigw.JsonSchemaType.STRING,
// },
// title: {
// type: apigw.JsonSchemaType.STRING,
// },
// body: {
// type: apigw.JsonSchemaType.STRING,
// },
// },
// required: ['board_id', 'tag_id', 'thread_id', 'title', 'body'],
// },
// },
// required: ['data'],
// };
export const forumThreadPatchReqSchema: apigw.JsonSchema = {
schema: apigw.JsonSchemaVersion.DRAFT7,
type: apigw.JsonSchemaType.OBJECT,
properties: {
data: {
type: apigw.JsonSchemaType.OBJECT,
properties: {
board_id: {
type: apigw.JsonSchemaType.STRING,
},
tag_id: {
type: apigw.JsonSchemaType.STRING,
},
thread_id: {
type: apigw.JsonSchemaType.STRING,
},
title: {
type: apigw.JsonSchemaType.STRING,
},
body: {
type: apigw.JsonSchemaType.STRING,
},
},
required: ['board_id', 'tag_id', 'thread_id', 'title', 'body'],
},
},
required: ['data'],
};

export const forumCommentGetRespSchema: apigw.JsonSchema = {
schema: apigw.JsonSchemaVersion.DRAFT7,
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/common/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const enum DataEndpoint {
CAREER,
TIMETABLE,
COURSE,
// THREAD,
THREAD,
COMMENT,
}

Expand Down
Loading

0 comments on commit 1e0b50b

Please sign in to comment.