Conversation
d642093 to
c58b5b6
Compare
c54dfd8 to
e3bd7d1
Compare
| var balance int64 | ||
| if err := rows.Scan(&mint, &balance); err == nil { | ||
| walletTokenBalances[mint] = balance | ||
| walletTokenBalances[mint] += balance |
api/dbv1/full_comments.go
Outdated
| WHERE comments.comment_id = ANY(@ids::int[]) | ||
| AND ( | ||
| (comments.entity_type = 'Track' AND (@include_unlisted = true OR COALESCE(tracks.is_unlisted, false) = false)) | ||
| OR comments.entity_type = 'Coin' |
| g.Post("/tracks/:trackId/downloads", app.requireAuthMiddleware, app.requireWriteScope, app.postV1TrackDownload) | ||
| g.Put("/tracks/:trackId", app.requireAuthMiddleware, app.requireWriteScope, app.putV1Track) | ||
| g.Delete("/tracks/:trackId", app.requireAuthMiddleware, app.requireWriteScope, app.deleteV1Track) | ||
| g.Get("/fan_club/feed", app.v1FanClubFeed) |
There was a problem hiding this comment.
can you also add fan-club? i think we are generally moving in the direction of - instead of _
| @@ -0,0 +1,396 @@ | |||
| package api | |||
There was a problem hiding this comment.
name of test is correct, but the other file should be fan_club_feed right?
|
|
||
| return c.JSON(fiber.Map{ | ||
| "data": items, | ||
| "related": fiber.Map{ |
There was a problem hiding this comment.
why do we need the related stuff in the first place?
There was a problem hiding this comment.
The related key embeds associated users and tracks directly in the response to avoid N+1 requests on the client side — the same pattern used elsewhere in the API (e.g. track comments). Without it, clients would need a separate request per comment to resolve author info and linked tracks.
There was a problem hiding this comment.
why do we need linked tracks? is that a UI thing?
There was a problem hiding this comment.
Yes — text posts can have a linked track (e.g. "check out this track"), so the UI needs track metadata (title, artwork) to render the post inline. Without pre-fetching it here the client would need a separate request per post to resolve the track.
| @@ -14682,6 +14682,7 @@ components: | |||
| description: Type of entity that can be commented on | |||
There was a problem hiding this comment.
also probably want the new endpoint changes in swagger too
No description provided.