replace AbortWithError calls by custom function that sets the content type correctly

This commit is contained in:
Markus Muellner authored and Benj Fassbind committed 2023-01-23 10:42:57 +01:00
1 parent 81582bffd2
commit ecc41f0c0f
11 files changed
+116 -111

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ func apiPackagesShow(c *gin.Context) {
collectionFactory := context.NewCollectionFactory()
p, err := collectionFactory.PackageCollection().ByKey([]byte(c.Params.ByName("key")))
if err != nil {
c.AbortWithError(404, err)
AbortWithJSONError(c, 404, err)
return
}