Skip to content

Commit

Permalink
✨ Add Property for Mastodon Profile URL
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Nov 12, 2023
1 parent 8b5bad2 commit 1112c30
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ definitions:
type: string
url:
type: string
mastodon:
type: string
status:
type: string
error:
Expand Down
2 changes: 2 additions & 0 deletions internal/api/response/ticker.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type Information struct {
Twitter string `json:"twitter"`
Facebook string `json:"facebook"`
Telegram string `json:"telegram"`
Mastodon string `json:"mastodon"`
}

type Telegram struct {
Expand Down Expand Up @@ -66,6 +67,7 @@ func TickerResponse(t storage.Ticker, config config.Config) Ticker {
Twitter: t.Information.Twitter,
Facebook: t.Information.Facebook,
Telegram: t.Information.Telegram,
Mastodon: t.Information.Mastodon,
},
Telegram: Telegram{
Active: t.Telegram.Active,
Expand Down
2 changes: 2 additions & 0 deletions internal/api/tickers.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ func updateTicker(t *storage.Ticker, c *gin.Context) error {
Twitter string `json:"twitter"`
Facebook string `json:"facebook"`
Telegram string `json:"telegram"`
Mastodon string `json:"mastodon"`
} `json:"information"`
Location struct {
Lat float64 `json:"lat"`
Expand All @@ -350,6 +351,7 @@ func updateTicker(t *storage.Ticker, c *gin.Context) error {
t.Information.Twitter = body.Information.Twitter
t.Information.Facebook = body.Information.Facebook
t.Information.Telegram = body.Information.Telegram
t.Information.Mastodon = body.Information.Mastodon
t.Location.Lat = body.Location.Lat
t.Location.Lon = body.Location.Lon

Expand Down
1 change: 1 addition & 0 deletions internal/storage/ticker.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type TickerInformation struct {
Twitter string
Facebook string
Telegram string
Mastodon string
}

type TickerTelegram struct {
Expand Down

0 comments on commit 1112c30

Please sign in to comment.