Skip to content
Snippets Groups Projects
Commit 8142d554 authored by Ophestra's avatar Ophestra
Browse files

correct operator usage

parent 5b5da3cc
Branches
Tags v0.8.4
No related merge requests found
...@@ -335,7 +335,7 @@ func registerAPI() { ...@@ -335,7 +335,7 @@ func registerAPI() {
router.GET(api.ImageFile, func(context *gin.Context) { router.GET(api.ImageFile, func(context *gin.Context) {
flake := context.Param("flake") flake := context.Param("flake")
image, data := instance.ImageData(instance.ImageSnowflakeHash(flake), false) image, data := instance.ImageData(instance.ImageSnowflakeHash(flake), false)
if image.Snowflake == flake { if image.Snowflake != flake {
context.JSON(http.StatusNotFound, api.Error{Error: "not found"}) context.JSON(http.StatusNotFound, api.Error{Error: "not found"})
return return
} }
...@@ -345,7 +345,7 @@ func registerAPI() { ...@@ -345,7 +345,7 @@ func registerAPI() {
router.GET(api.ImagePreview, func(context *gin.Context) { router.GET(api.ImagePreview, func(context *gin.Context) {
flake := context.Param("flake") flake := context.Param("flake")
image, data := instance.ImageData(instance.ImageSnowflakeHash(flake), true) image, data := instance.ImageData(instance.ImageSnowflakeHash(flake), true)
if image.Snowflake == flake { if image.Snowflake != flake {
context.JSON(http.StatusNotFound, api.Error{Error: "not found"}) context.JSON(http.StatusNotFound, api.Error{Error: "not found"})
return return
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment