mirror of
https://github.com/elyby/chrly.git
synced 2024-12-29 00:10:19 +05:30
04714543b8
Упразднён пакет utils. Удалён обработчик minecraft.php (legacy с самого-самого начала Ely.by) Добавлены тесты для всех api-запросов.
19 lines
408 B
Go
19 lines
408 B
Go
package http
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
func (cfg *Config) NotFound(response http.ResponseWriter, request *http.Request) {
|
|
data, _ := json.Marshal(map[string]string{
|
|
"status": "404",
|
|
"message": "Not Found",
|
|
"link": "http://docs.ely.by/skin-system.html",
|
|
})
|
|
|
|
response.Header().Set("Content-Type", "application/json")
|
|
response.WriteHeader(http.StatusNotFound)
|
|
response.Write(data)
|
|
}
|