Skip to content
Snippets Groups Projects
Commit 79697830 authored by Felipe D'Abrantes's avatar Felipe D'Abrantes
Browse files

Remove createdAt parameter when creating a Daily

parent 6f260b8e
No related branches found
No related tags found
1 merge request!14Add endpoints to manage Dailies
...@@ -33,10 +33,10 @@ object Daily { ...@@ -33,10 +33,10 @@ object Daily {
questionId: ObjectId, questionId: ObjectId,
content: String, content: String,
likes: Int = 0, likes: Int = 0,
createdAt: Date = Date.from(Instant.now()),
timeout: Int = 4 timeout: Int = 4
): Daily = { ): Daily = {
val daily: Daily = Daily(None, userId, questionId, content, likes, createdAt) val now: Date = Date.from(Instant.now())
val daily: Daily = Daily(None, userId, questionId, content, likes, now)
val future: Future[Daily] = dailyRepo.insertDaily(daily) val future: Future[Daily] = dailyRepo.insertDaily(daily)
Await.result(future, timeout.seconds) Await.result(future, timeout.seconds)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment