Fakultas Ilmu Komputer UI

Commit 657471d7 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Add alphabetical ordering for topics API

parent a0db0308
......@@ -18,7 +18,8 @@ defmodule Diskuy.Forum do
"""
def list_topics do
Repo.all(Topic)
query = from t in Topic, order_by: t.name
Repo.all(query)
end
@doc """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment