Initialized Project with default middlewares and helpers, connected to Atlas Instance and created Swagger Setup. Created necessary DB models and authentication-authorization logic
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
export default {
|
||||
"/user/create": {
|
||||
post: {
|
||||
tags: ["Auth"],
|
||||
summary: "Create Account for New User",
|
||||
requestBody: {
|
||||
required: true,
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
name: {
|
||||
type: "string",
|
||||
required: true,
|
||||
},
|
||||
id: {
|
||||
type: "string",
|
||||
required: true,
|
||||
},
|
||||
password: {
|
||||
type: "string",
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: "OK",
|
||||
content: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"/user/login": {
|
||||
post: {
|
||||
tags: ["Auth"],
|
||||
summary: "Login with Employee Id and Password",
|
||||
requestBody: {
|
||||
required: true,
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
id: {
|
||||
type: "string",
|
||||
required: true,
|
||||
},
|
||||
password: {
|
||||
type: "string",
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: "OK",
|
||||
content: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"/user/token/renew": {
|
||||
post: {
|
||||
tags: ["Auth"],
|
||||
summary: "Login with Employee Code and Password",
|
||||
requestBody: {
|
||||
required: true,
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
refreshToken: {
|
||||
type: "string",
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: "OK",
|
||||
content: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user