Skip to content

Restfull API - Basic Routing ( GET , PUT , DELETE , POST )#12

Open
pjap wants to merge 10 commits into
lively-fox-2017:masterfrom
pjap:master
Open

Restfull API - Basic Routing ( GET , PUT , DELETE , POST )#12
pjap wants to merge 10 commits into
lively-fox-2017:masterfrom
pjap:master

Conversation

@pjap
Copy link
Copy Markdown

@pjap pjap commented Oct 16, 2017

No description provided.

@tamatamvan
Copy link
Copy Markdown

sedikit saran, mungkin ada baiknya methods untuk check login dan check admin dipisah file untuk membedakan function module api user yg utama sama yg berupa helpers/middleware.

terus untuk response yg dibalikin ketika berhasil login, register, add user, delete, update user, atau methods apapun itu kalau bisa jangan cuma ngembaliin message semacem "delete user success". kasih tau juga user yg nge-akses api kita data mana yg berhasi kita manipulasi. ada baik nya juga setiap response itu dibungkus dalam object biar lebih gampang manipulasi ketika udah masuk front-end nanti. contoh :

res.send({
  message: 'Insert user success',
  dataInserted: {
    username: 'tamvan',
    password: 'asbdoasvdiuaskj'
  }
})

@pjap
Copy link
Copy Markdown
Author

pjap commented Oct 17, 2017 via email

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