Skip to content

Commit

Permalink
Updates to return todos in descending order by created date.
Browse files Browse the repository at this point in the history
  • Loading branch information
vega113 committed Nov 20, 2023
1 parent 4bc6741 commit c082642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/dao/UserTodoDao.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import javax.inject.Inject

class UserTodoDao @Inject()(dateTimeService: DateTimeService) {
def fetchByUserId(userId: Long)(implicit connection: Connection): List[UserTodo] = {
SQL("SELECT * FROM user_todos WHERE user_id = {userId} and is_deleted = false")
SQL("SELECT * FROM user_todos WHERE user_id = {userId} and is_deleted = false order by created desc")
.on("userId" -> userId)
.as(UserTodo.parser.*)
}
Expand Down

0 comments on commit c082642

Please sign in to comment.