Move types to api

This commit is contained in:
video-prize-ranch
2022-07-22 11:55:22 -04:00
parent da42f7cf90
commit e0efe6caca
13 changed files with 126 additions and 139 deletions

View File

@@ -4,7 +4,6 @@ import (
"strings"
"codeberg.org/video-prize-ranch/rimgo/api"
"codeberg.org/video-prize-ranch/rimgo/types"
"codeberg.org/video-prize-ranch/rimgo/utils"
"github.com/gofiber/fiber/v2"
)
@@ -14,7 +13,7 @@ func HandleEmbed(c *fiber.Ctx) error {
c.Set("Cache-Control", "public,max-age=31557600")
c.Set("Content-Security-Policy", "default-src 'none'; media-src 'self'; style-src 'self'; img-src 'self'; font-src 'self'; block-all-mixed-content")
post, err := types.Album{}, error(nil)
post, err := api.Album{}, error(nil)
switch {
case strings.HasPrefix(c.Path(), "/a"):
post, err = api.FetchAlbum(c.Params("postID"))