mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-05 16:57:17 +08:00
23 lines
460 B
Go
23 lines
460 B
Go
package server
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/photoprism/photoprism/internal/api"
|
|
"github.com/photoprism/photoprism/internal/config"
|
|
)
|
|
|
|
// registerSharingRoutes adds routes for link sharing.
|
|
func registerSharingRoutes(router *gin.Engine, conf *config.Config) {
|
|
// Return if the web user interface is disabled.
|
|
if conf.DisableFrontend() {
|
|
return
|
|
}
|
|
|
|
s := router.Group(conf.BaseUri("/s"))
|
|
{
|
|
api.Shares(s)
|
|
api.SharePreview(s)
|
|
}
|
|
}
|