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

Andhika Muttaqien #44

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

Conversation

andhikam
Copy link

01-Rest-API-doucmentation - done (postman documentation link on README.md)
02-Rest-API - done
03-auth - register & login done

@andhikam
Copy link
Author

03 - Auth (Authenctication, Authorization, access_token > Done)
04 - Error Handler (Error Handler & Third API > Done)

*notes : Third API = Covid19 Global Summary Info > "Whatever your Todolist, please stay safe"

### (With Postman)

[Link to Postman API-documentation](https://documenter.getpostman.com/view/13589681/TVev662F#8280994e-0cfc-4583-b39e-bb3a7fc3f1e3)
Copy link
Contributor

Choose a reason for hiding this comment

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

oke lumayan lengkap ya response nya

@@ -0,0 +1,42 @@
module.exports = (err, req, res, next) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice lengkap ya

Comment on lines +47 to +56
due_date: {
type: DataTypes.DATE,
allowNull: false,
validate: {
notEmpty: {
args: true,
msg: 'Due Date Cannot be Empty',
},
},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

di handle ya ga boleh masukin sebelum hari ini

Copy link
Author

Choose a reason for hiding this comment

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

oh iya kak saya masukin nya lgsg di pas controller jadi sebelum create dan edit sudah di cek. kalau gitu gpp ga kak? atau di double saja ya?

`let dueDate = new Date(newTodo.due_date);

let currentDate = new Date();

if (dueDate < currentDate) {

const errorName = 'DueDateMustGratherThanToday';

next({

name: errorName,

});`

Comment on lines +6 to +18
TodoRoutes.use(authentication);

TodoRoutes.post('/', TodoController.createTodo);

TodoRoutes.get('/', TodoController.getTodos);

TodoRoutes.get('/:id', TodoController.getTodoId);

TodoRoutes.put('/:id', authorization, TodoController.editTodo);

TodoRoutes.patch('/:id', authorization, TodoController.editStatus);

TodoRoutes.delete('/:id', authorization, TodoController.deleteTodo);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice ya routing nya

@andhikam
Copy link
Author

05 - Client (Done)
06 - Social Login (Done - with google sign in)

@andhikam
Copy link
Author

Commit Final -

Finalize API Documentation with Postman
Remove bug from appearing logout button on case failed to login,

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.

3 participants