Send 404 on UUID route when not found
This commit is contained in:
@@ -22,5 +22,12 @@ func UUIDHandler(ctx *fasthttp.RequestCtx) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(uuid) < 1 {
|
||||||
|
ctx.SetStatusCode(404)
|
||||||
|
ctx.SetBodyString(http.StatusText(http.StatusNotFound))
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx.SetBodyString(uuid)
|
ctx.SetBodyString(uuid)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user