lolol i forgot this

This commit is contained in:
Morgan Bazalgette 2018-01-23 22:45:59 +01:00
parent a1eb970382
commit 77ba8aee78
No known key found for this signature in database
GPG Key ID: 40D328300D245DA5

View File

@ -21,6 +21,7 @@ type Achievement struct {
// amount of time.
func LoadAchievementsEvery(db *sqlx.DB, d time.Duration) {
for {
achievs = nil
err := db.Select(&achievs,
"SELECT id, name, description, icon FROM achievements ORDER BY id ASC")
if err != nil {
@ -53,7 +54,7 @@ func UserAchievementsGET(md common.MethodData) common.CodeMessager {
var ids []int
err := md.DB.Select(&ids, `SELECT ua.achievement_id FROM users_achievements ua
INNER JOIN users ON users.id = ua.user_id
WHERE `+whereClause, param)
WHERE `+whereClause+` ORDER BY ua.achievement_id ASC`, param)
switch {
case err == sql.ErrNoRows:
return common.SimpleResponse(404, "No such user!")