mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-05-05 07:57:27 +00:00
FEATURE: Add API Scopes (#228)
Adds a single API scope for accepting or unaccepting a solution.
This commit is contained in:
parent
8a4daddb8e
commit
65a9ccf876
@ -49,6 +49,11 @@ en:
|
|||||||
solved_event:
|
solved_event:
|
||||||
name: "Solved Event"
|
name: "Solved Event"
|
||||||
details: "When a user marks a post as the accepted or unaccepted answer."
|
details: "When a user marks a post as the accepted or unaccepted answer."
|
||||||
|
api:
|
||||||
|
scopes:
|
||||||
|
descriptions:
|
||||||
|
solved:
|
||||||
|
answer: Accept/Unaccept a solution.
|
||||||
|
|
||||||
discourse_automation:
|
discourse_automation:
|
||||||
triggerables:
|
triggerables:
|
||||||
|
@ -249,6 +249,11 @@ SQL
|
|||||||
|
|
||||||
Discourse::Application.routes.append { mount ::DiscourseSolved::Engine, at: "solution" }
|
Discourse::Application.routes.append { mount ::DiscourseSolved::Engine, at: "solution" }
|
||||||
|
|
||||||
|
add_api_key_scope(
|
||||||
|
:solved,
|
||||||
|
{ answer: { actions: %w[discourse_solved/answer#accept discourse_solved/answer#unaccept] } },
|
||||||
|
)
|
||||||
|
|
||||||
topic_view_post_custom_fields_allowlister { ["is_accepted_answer"] }
|
topic_view_post_custom_fields_allowlister { ["is_accepted_answer"] }
|
||||||
|
|
||||||
def get_schema_text(post)
|
def get_schema_text(post)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user