Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions api/v1_comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (app *ApiServer) queryFullComments(
}

func (app *ApiServer) postV1Comment(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)

var req CreateCommentRequest
if err := c.BodyParser(&req); err != nil {
Expand Down Expand Up @@ -188,7 +188,7 @@ func (app *ApiServer) postV1Comment(c *fiber.Ctx) error {
}

func (app *ApiServer) putV1Comment(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
commentID, err := trashid.DecodeHashId(c.Params("commentId"))
if err != nil {
return err
Expand Down Expand Up @@ -242,7 +242,7 @@ func (app *ApiServer) putV1Comment(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1Comment(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
commentID, err := trashid.DecodeHashId(c.Params("commentId"))
if err != nil {
return err
Expand Down Expand Up @@ -280,7 +280,7 @@ func (app *ApiServer) deleteV1Comment(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1CommentReact(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
commentID, err := trashid.DecodeHashId(c.Params("commentId"))
if err != nil {
return err
Expand Down Expand Up @@ -339,7 +339,7 @@ func (app *ApiServer) postV1CommentReact(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1CommentReact(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
commentID, err := trashid.DecodeHashId(c.Params("commentId"))
if err != nil {
return err
Expand Down Expand Up @@ -393,7 +393,7 @@ func (app *ApiServer) deleteV1CommentReact(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1CommentPin(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
commentID, err := trashid.DecodeHashId(c.Params("commentId"))
if err != nil {
return err
Expand Down Expand Up @@ -451,7 +451,7 @@ func (app *ApiServer) postV1CommentPin(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1CommentPin(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
commentID, err := trashid.DecodeHashId(c.Params("commentId"))
if err != nil {
return err
Expand Down Expand Up @@ -504,7 +504,7 @@ func (app *ApiServer) deleteV1CommentPin(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1CommentReport(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
commentID, err := trashid.DecodeHashId(c.Params("commentId"))
if err != nil {
return err
Expand Down
6 changes: 3 additions & 3 deletions api/v1_developer_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (app *ApiServer) v1DeveloperApps(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1DeveloperApp(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)

var req CreateDeveloperAppRequest
if err := c.BodyParser(&req); err != nil {
Expand Down Expand Up @@ -111,7 +111,7 @@ func (app *ApiServer) postV1DeveloperApp(c *fiber.Ctx) error {
}

func (app *ApiServer) putV1DeveloperApp(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
address := c.Params("address")

var req UpdateDeveloperAppRequest
Expand Down Expand Up @@ -161,7 +161,7 @@ func (app *ApiServer) putV1DeveloperApp(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1DeveloperApp(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
address := c.Params("address")

signer, err := app.getApiSigner(c)
Expand Down
6 changes: 3 additions & 3 deletions api/v1_playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (app *ApiServer) v1Playlist(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1Playlists(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)

// Parse and validate request body
var req CreatePlaylistRequest
Expand Down Expand Up @@ -182,7 +182,7 @@ func (app *ApiServer) postV1Playlists(c *fiber.Ctx) error {
}

func (app *ApiServer) putV1Playlist(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
playlistID, err := trashid.DecodeHashId(c.Params("playlistId"))
if err != nil {
return err
Expand Down Expand Up @@ -269,7 +269,7 @@ func (app *ApiServer) putV1Playlist(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1Playlist(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
playlistID, err := trashid.DecodeHashId(c.Params("playlistId"))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/v1_playlist_favorites.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (app *ApiServer) v1PlaylistFavorites(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1PlaylistFavorite(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
playlistID, err := trashid.DecodeHashId(c.Params("playlistId"))
if err != nil {
return err
Expand Down Expand Up @@ -77,7 +77,7 @@ func (app *ApiServer) postV1PlaylistFavorite(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1PlaylistFavorite(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
playlistID, err := trashid.DecodeHashId(c.Params("playlistId"))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/v1_playlist_reposts.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (app *ApiServer) v1PlaylistReposts(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1PlaylistRepost(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
playlistID, err := trashid.DecodeHashId(c.Params("playlistId"))
if err != nil {
return err
Expand Down Expand Up @@ -77,7 +77,7 @@ func (app *ApiServer) postV1PlaylistRepost(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1PlaylistRepost(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
playlistID, err := trashid.DecodeHashId(c.Params("playlistId"))
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion api/v1_playlist_shares.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func (app *ApiServer) postV1PlaylistShare(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
playlistID, err := trashid.DecodeHashId(c.Params("playlistId"))
if err != nil {
return err
Expand Down
6 changes: 3 additions & 3 deletions api/v1_track.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (app *ApiServer) v1Track(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1Tracks(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)

// Parse and validate request body
var req CreateTrackRequest
Expand Down Expand Up @@ -309,7 +309,7 @@ func (app *ApiServer) postV1Tracks(c *fiber.Ctx) error {
}

func (app *ApiServer) putV1Track(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down Expand Up @@ -396,7 +396,7 @@ func (app *ApiServer) putV1Track(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1Track(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion api/v1_track_downloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type DownloadMetadata struct {
}

func (app *ApiServer) postV1TrackDownload(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/v1_track_favorites.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (app *ApiServer) v1TrackFavorites(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1TrackFavorite(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down Expand Up @@ -77,7 +77,7 @@ func (app *ApiServer) postV1TrackFavorite(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1TrackFavorite(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/v1_track_reposts.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (app *ApiServer) v1TrackReposts(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1TrackRepost(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down Expand Up @@ -79,7 +79,7 @@ func (app *ApiServer) postV1TrackRepost(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1TrackRepost(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion api/v1_track_shares.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func (app *ApiServer) postV1TrackShare(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
trackID, err := trashid.DecodeHashId(c.Params("trackId"))
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion api/v1_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (app *ApiServer) queryUsers(c *fiber.Ctx, sql string, args pgx.NamedArgs) e
}

func (app *ApiServer) putV1User(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
targetUserID, err := trashid.DecodeHashId(c.Params("userId"))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/v1_users_followers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (app *ApiServer) v1UsersFollowers(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1UserFollow(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
followeeUserID, err := trashid.DecodeHashId(c.Params("userId"))
if err != nil {
return err
Expand Down Expand Up @@ -74,7 +74,7 @@ func (app *ApiServer) postV1UserFollow(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1UserFollow(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
followeeUserID, err := trashid.DecodeHashId(c.Params("userId"))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/v1_users_muted.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (app *ApiServer) v1UsersMuted(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1UserMute(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
mutedUserID, err := trashid.DecodeHashId(c.Params("userId"))
if err != nil {
return err
Expand Down Expand Up @@ -68,7 +68,7 @@ func (app *ApiServer) postV1UserMute(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1UserMute(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
mutedUserID, err := trashid.DecodeHashId(c.Params("userId"))
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/v1_users_subscribers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (app *ApiServer) v1UsersSubscribers(c *fiber.Ctx) error {
}

func (app *ApiServer) postV1UserSubscribe(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
subscribeeUserID, err := trashid.DecodeHashId(c.Params("userId"))
if err != nil {
return err
Expand Down Expand Up @@ -73,7 +73,7 @@ func (app *ApiServer) postV1UserSubscribe(c *fiber.Ctx) error {
}

func (app *ApiServer) deleteV1UserSubscribe(c *fiber.Ctx) error {
userID := app.getUserId(c)
userID := app.getMyId(c)
subscribeeUserID, err := trashid.DecodeHashId(c.Params("userId"))
if err != nil {
return err
Expand Down
Loading