feat: add rating

This commit is contained in:
2026-05-20 12:22:04 +03:30
parent 445d2ac99e
commit 3b14752f2f
4 changed files with 74 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
meta {
name: ratings
seq: 15
}
auth {
mode: inherit
}
+21
View File
@@ -0,0 +1,21 @@
meta {
name: get all ratings
type: http
seq: 3
}
get {
url: {{baseUrl}}/ratings/:type/:id
body: none
auth: inherit
}
params:path {
type: music
id: 1
}
settings {
encodeUrl: true
timeout: 0
}
+20
View File
@@ -0,0 +1,20 @@
meta {
name: get ratings of user
type: http
seq: 2
}
get {
url: {{baseUrl}}/ratings/:music/:id/user
body: none
auth: inherit
}
params:path {
music:
id:
}
settings {
encodeUrl: true
}
+25
View File
@@ -0,0 +1,25 @@
meta {
name: store | update
type: http
seq: 1
}
post {
url: {{baseUrl}}/ratings/:type/:id
body: multipartForm
auth: inherit
}
params:path {
type: music
id: 1
}
body:multipart-form {
stars: 4
}
settings {
encodeUrl: true
timeout: 0
}