From b919e100e0cb624d3a2e4814074d6d281f62dde9 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 23 Jun 2024 00:02:22 +0800 Subject: [PATCH] :bug: Fix avatar url missing endpoint prefix --- .idea/workspace.xml | 58 ++++++++++++++++----------------- pkg/internal/models/accounts.go | 4 +-- settings.toml | 2 ++ 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8271e64..1eed986 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,10 +4,10 @@ - @@ -169,7 +168,8 @@ - true diff --git a/pkg/internal/models/accounts.go b/pkg/internal/models/accounts.go index ac7907d..49bff98 100644 --- a/pkg/internal/models/accounts.go +++ b/pkg/internal/models/accounts.go @@ -43,14 +43,14 @@ type Account struct { func (v Account) GetAvatar() *string { if v.Avatar != nil { - return lo.ToPtr(fmt.Sprintf("%s/api/attachments/%d", viper.GetString("paperclip.endpoint"), *v.Avatar)) + return lo.ToPtr(fmt.Sprintf("%s/api/attachments/%d", viper.GetString("content_endpoint"), *v.Avatar)) } return nil } func (v Account) GetBanner() *string { if v.Banner != nil { - return lo.ToPtr(fmt.Sprintf("%s/api/attachments/%d", viper.GetString("paperclip.endpoint"), *v.Banner)) + return lo.ToPtr(fmt.Sprintf("%s/api/attachments/%d", viper.GetString("content_endpoint"), *v.Banner)) } return nil } diff --git a/settings.toml b/settings.toml index d8b319f..7c60c2a 100644 --- a/settings.toml +++ b/settings.toml @@ -5,6 +5,8 @@ grpc_bind = "0.0.0.0:7444" domain = "localhost" secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi" +content_endpoint = "https://usercontent.solsynth.dev" + apns_topic = "dev.solsynth.solian.Runner" apns_credentials = "" apns_credentials_team = "000000000"