added temp collections cache

This commit is contained in:
Gani Georgiev committed 2024-04-25 10:14:59 +03:00
1 parent 2b82c36bdd
commit 950f796cbc
5 files changed
+82 -1

No files matched your search

+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)
}