Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Functional Programming
Diskuy-Backend
Commits
f48013bb
Commit
f48013bb
authored
Feb 05, 2021
by
Muhammad Rafif Elfazri
Browse files
Add Ordering on API Post and Threads Model
parent
92592449
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/diskuy/forum.ex
View file @
f48013bb
...
...
@@ -116,7 +116,8 @@ defmodule Diskuy.Forum do
"""
def
list_threads
do
Repo
.
all
(
Thread
)
query
=
from
t
in
Thread
,
order_by:
t
.
inserted_at
Repo
.
all
(
query
)
end
@doc
"""
...
...
@@ -212,7 +213,8 @@ defmodule Diskuy.Forum do
"""
def
list_posts
do
Repo
.
all
(
Post
)
query
=
from
p
in
Post
,
order_by:
p
.
inserted_at
Repo
.
all
(
query
)
end
@doc
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment