Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sherinoctavani
Copy link

Nanti di commit terakhir hal, yang perlu diletakkan di komen ini akan saya letakkan di API documentation

server/app.js Outdated
const port = process.env.PORT || 3000
const router = require ("./routes")
const errorhandler = require ('./middlewares/errorhandler.js')
const axios = require ('axios')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ini buat apa ya?

@@ -0,0 +1,32 @@
const { verifyToken } = require ('../helpers/jwt.js')
const { User } = require ("../models/index")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cukup gini aja ya

Suggested change
const { User } = require ("../models/index")
const { User } = require ("../models")

@@ -0,0 +1,54 @@
const { User } = require ("../models/index")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { User } = require ("../models/index")
const { User } = require ("../models")

@@ -0,0 +1,115 @@
const { Task, User } = require ("../models/index.js")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { Task, User } = require ("../models/index.js")
const { Task, User } = require ("../models")

@@ -0,0 +1,29 @@
const { Task } = require ("../models/index.js")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { Task } = require ("../models/index.js")
const { Task } = require ("../models")

})

if (!task) {
throw {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

404 yah


if (!task) {
throw {
status : 401,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
status : 401,
status : 404,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants