mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-02-16 08:34:56 +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:
|
||||
name: "Solved Event"
|
||||
details: "When a user marks a post as the accepted or unaccepted answer."
|
||||
api:
|
||||
scopes:
|
||||
descriptions:
|
||||
solved:
|
||||
answer: Accept/Unaccept a solution.
|
||||
|
||||
discourse_automation:
|
||||
triggerables:
|
||||
|
@ -249,6 +249,11 @@ SQL
|
||||
|
||||
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"] }
|
||||
|
||||
def get_schema_text(post)
|
||||
|
Loading…
x
Reference in New Issue
Block a user