Send 404 on UUID route when not found

This commit is contained in:
Jacob Gunther committed 2022-03-10 20:01:43 -06:00
1 parent e2b591c84f
commit 2c0b39c2d2
1 file changed
+7
+7
View File
@@ -22,5 +22,12 @@ func UUIDHandler(ctx *fasthttp.RequestCtx) {
return
}
if len(uuid) < 1 {
ctx.SetStatusCode(404)
ctx.SetBodyString(http.StatusText(http.StatusNotFound))
return
}
ctx.SetBodyString(uuid)
}