feat: add colors

This commit is contained in:
2026-06-16 19:14:43 +03:30
parent ef6649309e
commit 804efc8aad
10 changed files with 108 additions and 3 deletions
@@ -0,0 +1,19 @@
meta {
name: delete breathing color
type: http
seq: 4
}
delete {
url: {{baseUrl}}/breathing-colors/:id
body: none
auth: inherit
}
params:path {
id: 1
}
settings {
encodeUrl: true
}
@@ -0,0 +1,7 @@
meta {
name: breathing colors
}
auth {
mode: inherit
}
@@ -0,0 +1,21 @@
meta {
name: get breathing colors
type: http
seq: 1
}
get {
url: {{baseUrl}}/breathing-colors
body: none
auth: inherit
}
settings {
encodeUrl: true
}
docs {
Palette the app shows when creating a breathing template. Each item has
a `colors` array (one hex = solid, several = gradient). The user picks one
and sends its colors as `colors` on /breathing-templates.
}
@@ -0,0 +1,25 @@
meta {
name: store breathing color
type: http
seq: 2
}
post {
url: {{baseUrl}}/breathing-colors
body: json
auth: inherit
}
body:json {
{
"name": "بنفش",
"colors": ["#6829DD", "#1A50CC"],
"order": 1,
"is_active": true
}
}
settings {
encodeUrl: true
timeout: 0
}
@@ -0,0 +1,28 @@
meta {
name: update breathing color
type: http
seq: 3
}
put {
url: {{baseUrl}}/breathing-colors/:id
body: json
auth: inherit
}
params:path {
id: 1
}
body:json {
{
"name": "بنفش",
"colors": ["#6829DD", "#1A50CC"],
"is_active": true
}
}
settings {
encodeUrl: true
timeout: 0
}
+2 -1
View File
@@ -26,7 +26,8 @@ body:json {
"breath_hold":5,
"duration":45,
"description":"asdsadaasdas",
"image_id":3
"image_id":3,
"colors":["#6829DD","#1A50CC"]
}
}
+2
View File
@@ -15,6 +15,8 @@ body:multipart-form {
inhale: 8
exhale: 3
breath_hold: 4
~colors[]: #6829DD
~colors[]: #1A50CC
}
settings {