-
Notifications
You must be signed in to change notification settings - Fork 18
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
Ayu Sudi Dwijayanti #18
base: master
Are you sure you want to change the base?
Conversation
# fancy-todo |
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.
biasanya readme dibuat di sisi server saja, karena sebagai API Documentation
@@ -0,0 +1,38 @@ | |||
require('dotenv').config() |
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.
baiknya dibuat kondisi untuk proses development saja
const authorization = require('../middlewares/authorization') | ||
const ApiController = require('../controllers/apiController') | ||
|
||
router.post('/create', authentication, TodoController.create) |
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.
jika di rasa semua routes di bawah ini menggunakan authentication, bisa menggunakan router.use(authentication)
const moongose = require('mongoose') | ||
const {Schema} = moongose | ||
|
||
const todoSchema = Schema({ |
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.
tips: ketika membuat schema, gunakan timestamps: true untuk informasi createdAt dan updatedAt
} | ||
}) | ||
|
||
// todoSchema.methods.getDaysLeft = function(){ |
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.
semoga next bisa diselesaikan
message: 'Email must include @ and .' | ||
} | ||
}, | ||
password: { |
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.
validasinya luar biasa yaa :D
|
||
|
||
userSchema.pre('save', function () { | ||
console.log('aaaaaaaaaaaaaaaaaaaaa'); |
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.
aaaaaa
next() | ||
} | ||
}) | ||
.catch(()=>{ |
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.
jika sudah dibuat default di errorHandler, tidak perlu diinput lagi status dan messagenya
}) | ||
} | ||
}) | ||
.catch(() =>{ |
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 catch untuk internal server error yaa
<div class="beforeLogin"> | ||
<div class="container" id="register"> | ||
<div class="registerTodo"> | ||
<center> |
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 sudah tidak support di HTML5
$(".beforeLogin").hide() | ||
$(".regist").hide() | ||
$(".signIn").hide() | ||
getAll() |
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.
perhatikan lagi di proses ini yaa, karena tidak ketrigger ketika berhasil login menggunakan g-signin
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.
okee kak makasih sarannya
Overall sudah OK, pemilihan backgaround bisa lebih smooth themanya supaya tidak bentrok dengan warna element lain. Jika ada perubahan atau deploy, slack instructor yaa |
fitur :
kendala :
tapi gak jadi karena fs nya di script gak bisa require akhirnya
cssnya disempen ke variable (hardcode) lalu dikirim
-belum semuanya ke errorhandler, tapi tidak pakai alert :)
saat dibuka lewat email pada iphone hasilnya bagus..
tapi waktu di buka dari app gmail tidak (tapi ada cssnya tp hasilnya beda)
.env
DEFAULT_PS=Admin123
JWT_KEY=HappyWeekend
GOOGLE_CLIENT_ID=413097102968-5esi6ggnd8o2s2pk1bdjhocuaboaehn8.apps.googleusercontent.com
SENDGRID_API_KEY=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
kekurangan:
saat berhasil create/update/delete tidak ada pemberitahuannya