Implemented /profile/{username} endpoint to get complete profile with signed by the current server textures.

Implemented /signing-key endpoint to get public key in der format, used to sign the textures.
Improved logging of errors from http package.
Changed behavior of the /cloaks endpoint
This commit is contained in:
ErickSkrauch
2021-02-26 02:45:45 +01:00
parent 247499df6a
commit 6f148a8791
15 changed files with 1001 additions and 243 deletions

View File

@@ -36,7 +36,7 @@ func StartServer(server *http.Server, logger slf.Logger) {
go func() {
s := waitForExitSignal()
logger.Info("Got signal: :signal, starting graceful shutdown", wd.StringParam("signal", s.String()))
server.Shutdown(context.Background())
_ = server.Shutdown(context.Background())
logger.Info("Graceful shutdown succeed, exiting", wd.StringParam("signal", s.String()))
close(done)
}()
@@ -135,7 +135,3 @@ func apiNotFound(resp http.ResponseWriter, reason string) {
})
_, _ = resp.Write(result)
}
func apiServerError(resp http.ResponseWriter) {
resp.WriteHeader(http.StatusInternalServerError)
}