Rewrite to use external modules

This commit is contained in:
Jacob Gunther
2022-03-18 15:21:20 -05:00
parent 061779f6f3
commit baed581d69
30 changed files with 681 additions and 1323 deletions

View File

@@ -11,7 +11,7 @@ import (
func UUIDHandler(ctx *fasthttp.RequestCtx) {
user := ctx.UserValue("user").(string)
uuid, err := util.GetUUID(user)
uuid, ok, err := util.LookupUUID(user)
if err != nil {
log.Println(err)
@@ -22,7 +22,7 @@ func UUIDHandler(ctx *fasthttp.RequestCtx) {
return
}
if len(uuid) < 1 {
if !ok {
ctx.SetStatusCode(404)
ctx.SetBodyString(http.StatusText(http.StatusNotFound))