added temp collections cache

This commit is contained in:
Gani Georgiev
2024-04-25 10:05:47 +03:00
parent 2b82c36bdd
commit 950f796cbc
5 changed files with 82 additions and 1 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ func LoadCollectionContext(app core.App, optCollectionTypes ...string) echo.Midd
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
if param := c.PathParam("collection"); param != "" {
collection, err := app.Dao().FindCollectionByNameOrId(param)
collection, err := core.FindCachedCollectionByNameOrId(app, param)
if err != nil || collection == nil {
return NewNotFoundError("", err)
}