summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandomChars <random@chars.jp>2021-08-20 14:21:24 +0900
committerRandomChars <random@chars.jp>2021-08-20 14:21:24 +0900
commit8142d554bd3de7419a455e27904d0d369f1b0bee (patch)
tree9174aa11f8675434bb8d8d4e80bb614fbe9403b5
parent5b5da3cc481e534c29009ee8b8e3857ef21e8818 (diff)
correct operator usagev0.8.4
-rw-r--r--api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api.go b/api.go
index 77bcd1a..f199bae 100644
--- a/api.go
+++ b/api.go
@@ -335,7 +335,7 @@ func registerAPI() {
router.GET(api.ImageFile, func(context *gin.Context) {
flake := context.Param("flake")
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"})
return
}
@@ -345,7 +345,7 @@ func registerAPI() {
router.GET(api.ImagePreview, func(context *gin.Context) {
flake := context.Param("flake")
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"})
return
}