diff --git a/backend-services/feed-service/app/controllers/DailyController.scala b/backend-services/feed-service/app/controllers/DailyController.scala index 560b65d21f76ffa8b0064ea3fea8a85a6b7166d8..06401a9a18936dfcea4eb39bdbfebae90101f914 100644 --- a/backend-services/feed-service/app/controllers/DailyController.scala +++ b/backend-services/feed-service/app/controllers/DailyController.scala @@ -69,7 +69,7 @@ class DailyController @Inject()(val controllerComponents: ControllerComponents) try { // Dummy data - val result = Daily.createDailyAsync(None, new ObjectId("641128f7e80bcd1ba39d04ae"), new ObjectId("641128f7e80bcd1ba39d04ae"), "asddas", 221) + val result = Daily.createDailyAsync(None, new ObjectId("641128f7e80bcd1ba39d04ae"), new ObjectId("641128f7e80bcd1ba39d04ae"), "asddas") val jsonResult = Daily.toJson(result) Ok(jsonResult) } catch { diff --git a/backend-services/feed-service/app/models/Daily.scala b/backend-services/feed-service/app/models/Daily.scala index d7ac7f55978f50479acf9e81baf491b9f8e98a1f..ef4ee4b71ac4ade120fcaaffcb436f6274595af8 100644 --- a/backend-services/feed-service/app/models/Daily.scala +++ b/backend-services/feed-service/app/models/Daily.scala @@ -32,11 +32,10 @@ object Daily { userId: ObjectId, questionId: ObjectId, content: String, - likes: Int = 0, timeout: Int = 4 ): Daily = { val now: Date = Date.from(Instant.now()) - val daily: Daily = Daily(None, userId, questionId, content, likes, now) + val daily: Daily = Daily(None, userId, questionId, content, 0, now, now) val future: Future[Daily] = dailyRepo.insertDaily(daily) Await.result(future, timeout.seconds) }