-
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.
V.1.1
- Loading branch information
Showing
36 changed files
with
20,416 additions
and
3,535 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PORT = YOUR_PORT | ||
MONGO_URI = YOUR_MONGO_URI |
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,54 @@ | ||
env: | ||
node: true | ||
es6: true | ||
mocha: true | ||
|
||
extends: 'eslint:recommended' | ||
|
||
parser: 'babel-eslint' | ||
|
||
parserOptions: | ||
ecmaVersion: 6 | ||
sourceType: 'module' | ||
ecmaFeatures: | ||
jsx: true | ||
modules: true | ||
experimentalObjectRestSpread: true | ||
|
||
rules: | ||
handle-callback-err: 2 | ||
no-debugger: 2 | ||
no-fallthrough: 2 | ||
eol-last: 1 | ||
no-irregular-whitespace: 1 | ||
no-mixed-spaces-and-tabs: [1, smart-tabs] | ||
no-trailing-spaces: 1 | ||
no-new-require: 2 | ||
no-undef: 2 | ||
no-unreachable: 2 | ||
no-unused-vars: [1, { 'vars': 'all', 'args': 'none' }] | ||
no-console: 2 | ||
max-len: [2, 150, 4] | ||
prefer-arrow-callback: | ||
- error | ||
- allowNamedFunctions: true | ||
indent: | ||
- error | ||
- 2 | ||
linebreak-style: | ||
- error | ||
- unix | ||
quotes: | ||
- error | ||
- single | ||
semi: | ||
- error | ||
- always | ||
no-lonely-if: 2 | ||
no-else-return: 2 | ||
no-empty-function: 1 | ||
no-eq-null: 2 | ||
no-var: 2 | ||
strict: | ||
- error | ||
- global |
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
18 changes: 9 additions & 9 deletions
18
app/api/components/user/api_depository/request/request_management.js
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,22 +1,22 @@ | ||
const User = require('./main'); | ||
|
||
const createUser = async (payload) => { | ||
const user = new User(); | ||
return user.createUser(payload); | ||
const user = new User(); | ||
return user.createUser(payload); | ||
}; | ||
|
||
const updateUser = async (payload) => { | ||
const user = new User(); | ||
return user.updateUser(payload); | ||
const user = new User(); | ||
return user.updateUser(payload); | ||
}; | ||
|
||
const deleteUser = async (payload) => { | ||
const user = new User(); | ||
return user.deleteUser(payload); | ||
const user = new User(); | ||
return user.deleteUser(payload); | ||
}; | ||
|
||
module.exports = { | ||
createUser, | ||
updateUser, | ||
deleteUser, | ||
createUser, | ||
updateUser, | ||
deleteUser, | ||
}; |
18 changes: 9 additions & 9 deletions
18
app/api/components/user/api_depository/request/request_schema.js
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,22 +1,22 @@ | ||
const joi = require('joi'); | ||
|
||
const createUser = joi.object({ | ||
name: joi.string().required(), | ||
address: joi.string().required(), | ||
name: joi.string().required(), | ||
address: joi.string().required(), | ||
}); | ||
|
||
const updateUser = joi.object({ | ||
userId: joi.string().guid().required(), | ||
name: joi.string().required(), | ||
address: joi.string().required(), | ||
userId: joi.string().guid().required(), | ||
name: joi.string().required(), | ||
address: joi.string().required(), | ||
}); | ||
|
||
const deleteUser = joi.object({ | ||
userId: joi.string().guid().required(), | ||
userId: joi.string().guid().required(), | ||
}); | ||
|
||
module.exports = { | ||
createUser, | ||
updateUser, | ||
deleteUser, | ||
createUser, | ||
updateUser, | ||
deleteUser, | ||
}; |
Oops, something went wrong.