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

setup #39

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

setup #39

wants to merge 13 commits into from

Conversation

Andrenoj11
Copy link

in server:

  1. set login and register
  2. set crud endpoints
    in client:
  3. init template index.html and css

1. set login and register
2. set crud endpoints
in client:
1. init template index.html and css
static delTask(req, res, next) {
Task.findByPk(+req.params.id)
.then(data => {
if (data.UserId == req.userLogIn.id) {
Copy link

Choose a reason for hiding this comment

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

ini ga perlu yah ,
kan udah diprotect di middleware authorization

}
Task.findByPk(+req.params.id)
.then(data => {
if (data.UserId == req.userLogIn.id) {
Copy link

Choose a reason for hiding this comment

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

ini juga

Task.findOne({where: {
id: req.params.id
}})
.then(todo => {
Copy link

Choose a reason for hiding this comment

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

todo?? 😆

Task.belongsTo(models.User)
}
};
Task.init({
Copy link

Choose a reason for hiding this comment

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

validasi yah

User.hasMany(models.Task)
}
};
User.init({
Copy link

Choose a reason for hiding this comment

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

validasi juga yah

@Andrenoj11
Copy link
Author

berikut isi file .env ku kak:
SECRET=hacktiv8
GOOGLE_CLIENTID="166375431684-efkve6dh1ehpk1ic1m0sd818as9bpf78.apps.googleusercontent.com"
GOOGLE_PW=password

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