21 lines
504 B
Go
21 lines
504 B
Go
package utils
|
|
|
|
import (
|
|
"clickandjoin.app/storageserver/modules/config"
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
const URL = "http://localhost:8081/v1/"
|
|
|
|
func GetAuhorizationToken(c *fiber.Ctx) string {
|
|
return c.GetReqHeaders()["X-Authorization"]
|
|
}
|
|
|
|
func GetUserStoragePath(userId string) string {
|
|
return config.Cfg.StoragePath + "users/" + userId + "/"
|
|
}
|
|
|
|
func GetUserAvatarUrl(userId string, filename string) string {
|
|
return config.Cfg.StorageUrlAddress + "avatars/" + userId + "/" + filename + ".webp"
|
|
}
|