func setAchievement(w http.ResponseWriter, r *http.Request) {
	data := context.Get(r, "data").(string)
	sid := context.Get(r, "achievementid").(string)
	id, err := strconv.ParseInt(sid, 10, 0)
	if err != nil {
		EasyErrorResponse(w, core.NebError, err)
		return
	}
	var ach core.AchievementData
	json.Unmarshal([]byte(data), &ach)
	err = core.SetAchievementData(int(id), ach)
	if err != nil {
		EasyErrorResponse(w, core.NebError, err)
		return
	}
	EasyResponse(w, core.NebErrorNone, "Updated achievement table")
}
User connected, must be admin, form value: data, achievementid
package handlers
import (
	"encoding/json"
	"fmt"
	"net/http"
	"strconv"
	"github.com/Nebuleuse/Nebuleuse/core"
	"github.com/gorilla/context"
)
type dashboardInfosResponse struct {
	UserCount   int
	OnlineUsers int
	UpdateCount int
}
func getDashboardInfos(w http.ResponseWriter, r *http.Request) {
	var dashRes dashboardInfosResponse
	dashRes.OnlineUsers = core.CountOnlineUsers()
	dashRes.UserCount = core.GetUserCount()
	dashRes.UpdateCount = core.GetBuildsCount()
	EasyDataResponse(w, dashRes)
}
func getAchievements(w http.ResponseWriter, r *http.Request) {
	ach, err := core.GetAchievementsData()
	if err != nil {
		EasyErrorResponse(w, core.NebError, err)
		return
	}
	EasyDataResponse(w, ach)
}
func getAchievement(w http.ResponseWriter, r *http.Request) {
	id := context.Get(r, "achievementid").(string)
	ach, err := core.GetAchievementData(id)
	if err != nil {
		EasyErrorResponse(w, core.NebError, err)
		return
	}
	EasyDataResponse(w, ach)
}