-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHERIN OCTAVANI B #38
base: main
Are you sure you want to change the base?
Conversation
server/app.js
Outdated
const port = process.env.PORT || 3000 | ||
const router = require ("./routes") | ||
const errorhandler = require ('./middlewares/errorhandler.js') | ||
const axios = require ('axios') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ini buat apa ya?
server/middlewares/authentication.js
Outdated
@@ -0,0 +1,32 @@ | |||
const { verifyToken } = require ('../helpers/jwt.js') | |||
const { User } = require ("../models/index") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cukup gini aja ya
const { User } = require ("../models/index") | |
const { User } = require ("../models") |
server/controllers/usercontroller.js
Outdated
@@ -0,0 +1,54 @@ | |||
const { User } = require ("../models/index") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { User } = require ("../models/index") | |
const { User } = require ("../models") |
server/controllers/taskcontroller.js
Outdated
@@ -0,0 +1,115 @@ | |||
const { Task, User } = require ("../models/index.js") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { Task, User } = require ("../models/index.js") | |
const { Task, User } = require ("../models") |
server/middlewares/authorization.js
Outdated
@@ -0,0 +1,29 @@ | |||
const { Task } = require ("../models/index.js") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { Task } = require ("../models/index.js") | |
const { Task } = require ("../models") |
}) | ||
|
||
if (!task) { | ||
throw { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404 yah
server/middlewares/authorization.js
Outdated
|
||
if (!task) { | ||
throw { | ||
status : 401, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
status : 401, | |
status : 404, |
Nanti di commit terakhir hal, yang perlu diletakkan di komen ini akan saya letakkan di API documentation