🐛 Fix incomplete url when expand
This commit is contained in:
@ -19,7 +19,7 @@ func MapAPIs(app *fiber.App) {
|
||||
|
||||
api := app.Group("/api").Name("API")
|
||||
{
|
||||
api.Get("/links/:target", getLinkMeta)
|
||||
api.Get("/links/*", getLinkMeta)
|
||||
|
||||
api.Use(func(c *fiber.Ctx) error {
|
||||
if err := exts.EnsureAuthenticated(c); err != nil {
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
var inProgress sync.Map
|
||||
|
||||
func getLinkMeta(c *fiber.Ctx) error {
|
||||
targetEncoded := c.Params("target")
|
||||
targetRaw, _ := base64.URLEncoding.DecodeString(targetEncoded)
|
||||
targetEncoded := c.Params("*1")
|
||||
targetRaw, _ := base64.StdEncoding.DecodeString(targetEncoded)
|
||||
|
||||
if ch, loaded := inProgress.LoadOrStore(targetEncoded, make(chan struct{})); loaded {
|
||||
// If the request is already in progress, wait for it to complete
|
||||
|
Reference in New Issue
Block a user