diff --git a/collection.bru b/collection.bru index bd8f844..8b06e5b 100644 --- a/collection.bru +++ b/collection.bru @@ -11,9 +11,9 @@ auth:bearer { } vars:pre-request { - token: 2|gpnAibfdNxCcnEVbMMzw8akRoQyzCKfjoJtK5qOp7d0fcbb3 - baseUrl: http://localhost:8000/api - ~baseUrl: https://meditation.approagency.ir/api + token: 6525|frMOcyJV7elCdNV0tfbCo2IvDEhSCStG6LHJ21cq8dbd4b29 + baseUrl: https://meditation.approagency.ir/api + ~baseUrl: http://localhost:8000/api ~baseUrl: ~baseUrl: ~approo_token: diff --git a/survey-question/get survay.bru b/survey-question/get survay.bru index 7c37023..0622bc1 100644 --- a/survey-question/get survay.bru +++ b/survey-question/get survay.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{baseUrl}}/survey-questions/2 + url: {{baseUrl}}/survey-questions/ body: none auth: inherit } diff --git a/survey-question/store survay.bru b/survey-question/store survay.bru index 7d60351..8db7d52 100644 --- a/survey-question/store survay.bru +++ b/survey-question/store survay.bru @@ -19,13 +19,16 @@ body:json { "is_active": true, "options": [ { - "label": "Laravel" + "label": "Laravel", + "tags": ["focus", "calm"] }, { - "label": "React" + "label": "React", + "tags": ["energy"] }, { - "label": "Vue.js" + "label": "Vue.js", + "tags": [] }, { "label": "Django" @@ -47,3 +50,9 @@ settings { encodeUrl: true timeout: 0 } + +docs { + Each option may carry `tags` (array of tag names). Tags are firstOrCreate'd + and linked to the option; they drive `survey-questions/suggested-media`, + which matches media that share the tags behind the user's chosen options. +} diff --git a/survey-question/update.bru b/survey-question/update.bru index 40c0d30..8a642ec 100644 --- a/survey-question/update.bru +++ b/survey-question/update.bru @@ -19,14 +19,16 @@ body:json { "options": [ { - "label": "Laravel" + "label": "Laravel", + "tags": ["focus", "calm"] }, { - "label": "React.js" - + "label": "React.js", + "tags": ["energy"] }, { - "label": "Vue.js" + "label": "Vue.js", + "tags": [] }, { "label": "Django" @@ -39,3 +41,8 @@ settings { encodeUrl: true timeout: 0 } + +docs { + Sending `options` replaces the whole option set (and clears existing answers). + Each option may include `tags` (array of tag names) used by suggested-media. +}