Routing: Prefix frontend UI routes with /library #840 #2466

Also improves migrations and updates the db schema docs.

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2022-10-15 21:54:11 +02:00
parent 3bad6820d7
commit e3bb8b19dd
202 changed files with 3189 additions and 2608 deletions

View File

@@ -10,8 +10,8 @@ import (
"github.com/photoprism/photoprism/internal/acl"
"github.com/photoprism/photoprism/internal/event"
"github.com/photoprism/photoprism/internal/get"
"github.com/photoprism/photoprism/internal/i18n"
"github.com/photoprism/photoprism/internal/service"
"github.com/photoprism/photoprism/pkg/clean"
"github.com/photoprism/photoprism/pkg/fs"
)
@@ -22,7 +22,7 @@ import (
func GetConfigOptions(router *gin.RouterGroup) {
router.GET("/config/options", func(c *gin.Context) {
s := Auth(c, acl.ResourceConfig, acl.AccessAll)
conf := service.Config()
conf := get.Config()
// Abort if permission was not granted.
if s.Invalid() || conf.Public() || conf.DisableSettings() {
@@ -40,7 +40,7 @@ func GetConfigOptions(router *gin.RouterGroup) {
func SaveConfigOptions(router *gin.RouterGroup) {
router.POST("/config/options", func(c *gin.Context) {
s := Auth(c, acl.ResourceConfig, acl.ActionManage)
conf := service.Config()
conf := get.Config()
if s.Invalid() || conf.Public() || conf.DisableSettings() {
AbortForbidden(c)