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
57 changes: 42 additions & 15 deletions api/swagger/swagger-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10415,12 +10415,16 @@ components:
create_user_response:
type: object
properties:
success:
type: boolean
description: Whether the user was created successfully
transaction_hash:
type: string
description: The blockchain transaction hash
block_hash:
type: string
description: The blockchain block hash
block_number:
type: integer
format: int64
description: The blockchain block number/height
user_id:
type: string
description: The ID of the created user
Expand Down Expand Up @@ -10595,12 +10599,16 @@ components:
create_comment_response:
type: object
properties:
success:
type: boolean
description: Whether the comment was created successfully
transaction_hash:
type: string
description: The blockchain transaction hash
block_hash:
type: string
description: The blockchain block hash
block_number:
type: integer
format: int64
description: The blockchain block number/height
comment_id:
type: string
description: The ID of the created comment
Expand Down Expand Up @@ -10644,12 +10652,16 @@ components:
write_response:
type: object
properties:
success:
type: boolean
description: Whether the operation was successful
transaction_hash:
type: string
description: The blockchain transaction hash
block_hash:
type: string
description: The blockchain block hash
block_number:
type: integer
format: int64
description: The blockchain block number/height
playlist_artwork:
type: object
properties:
Expand Down Expand Up @@ -11116,6 +11128,13 @@ components:
transaction_hash:
type: string
description: Transaction hash of the creation
block_hash:
type: string
description: The blockchain block hash
block_number:
type: integer
format: int64
description: The blockchain block number/height
playlist_response:
required:
- latest_chain_block
Expand Down Expand Up @@ -12203,12 +12222,16 @@ components:
create_playlist_response:
type: object
properties:
success:
type: boolean
description: Whether the playlist was created successfully
transaction_hash:
type: string
description: The blockchain transaction hash
block_hash:
type: string
description: The blockchain block hash
block_number:
type: integer
format: int64
description: The blockchain block number/height
playlist_id:
type: string
description: The ID of the created playlist
Expand Down Expand Up @@ -13074,12 +13097,16 @@ components:
create_track_response:
type: object
properties:
success:
type: boolean
description: Whether the track was created successfully
transaction_hash:
type: string
description: The blockchain transaction hash
block_hash:
type: string
description: The blockchain block hash
block_number:
type: integer
format: int64
description: The blockchain block number/height
track_id:
type: string
description: The ID of the created track
Expand Down
24 changes: 16 additions & 8 deletions api/v1_comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,9 @@ func (app *ApiServer) postV1Comment(c *fiber.Ctx) error {

encodedCommentID, _ := trashid.EncodeHashId(commentID)
return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
"comment_id": encodedCommentID,
})
}
Expand Down Expand Up @@ -267,8 +268,9 @@ func (app *ApiServer) putV1Comment(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -305,8 +307,9 @@ func (app *ApiServer) deleteV1Comment(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -361,8 +364,9 @@ func (app *ApiServer) postV1CommentReact(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -415,8 +419,9 @@ func (app *ApiServer) deleteV1CommentReact(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -471,8 +476,9 @@ func (app *ApiServer) postV1CommentPin(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -525,8 +531,9 @@ func (app *ApiServer) deleteV1CommentPin(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -563,7 +570,8 @@ func (app *ApiServer) postV1CommentReport(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
15 changes: 10 additions & 5 deletions api/v1_grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ func (app *ApiServer) postV1UsersGrant(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -138,8 +139,9 @@ func (app *ApiServer) deleteV1UsersGrant(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -216,8 +218,9 @@ func (app *ApiServer) postV1UsersManager(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -290,8 +293,9 @@ func (app *ApiServer) deleteV1UsersManager(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -347,7 +351,8 @@ func (app *ApiServer) postV1UsersApproveGrant(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
9 changes: 6 additions & 3 deletions api/v1_playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ func (app *ApiServer) postV1Playlists(c *fiber.Ctx) error {

encodedPlaylistID, _ := trashid.EncodeHashId(playlistID)
return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
"playlist_id": encodedPlaylistID,
})
}
Expand Down Expand Up @@ -270,8 +271,9 @@ func (app *ApiServer) putV1Playlist(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -308,7 +310,8 @@ func (app *ApiServer) deleteV1Playlist(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
6 changes: 4 additions & 2 deletions api/v1_playlist_favorites.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ func (app *ApiServer) postV1PlaylistFavorite(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -123,7 +124,8 @@ func (app *ApiServer) deleteV1PlaylistFavorite(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
6 changes: 4 additions & 2 deletions api/v1_playlist_reposts.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ func (app *ApiServer) postV1PlaylistRepost(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -121,7 +122,8 @@ func (app *ApiServer) deleteV1PlaylistRepost(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
3 changes: 2 additions & 1 deletion api/v1_playlist_shares.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ func (app *ApiServer) postV1PlaylistShare(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
6 changes: 4 additions & 2 deletions api/v1_track.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@ func (app *ApiServer) postV1Tracks(c *fiber.Ctx) error {

encodedTrackID, _ := trashid.EncodeHashId(trackID)
return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
"track_id": encodedTrackID,
})
}
Expand Down Expand Up @@ -391,8 +392,9 @@ func (app *ApiServer) putV1Track(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down
3 changes: 2 additions & 1 deletion api/v1_track_downloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ func (app *ApiServer) postV1TrackDownload(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
6 changes: 4 additions & 2 deletions api/v1_track_favorites.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ func (app *ApiServer) postV1TrackFavorite(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}

Expand Down Expand Up @@ -121,7 +122,8 @@ func (app *ApiServer) deleteV1TrackFavorite(c *fiber.Ctx) error {
}

return c.JSON(fiber.Map{
"success": true,
"transaction_hash": response.Msg.GetTransaction().GetHash(),
"block_hash": response.Msg.GetTransaction().GetBlockHash(),
"block_number": response.Msg.GetTransaction().GetHeight(),
})
}
Loading