liquid_feedback_frontend
view app/main/api/notify_email.lua @ 1825:7b04f14c6d0a
Check area configuration only for new issues
| author | bsw | 
|---|---|
| date | Thu Feb 03 11:47:41 2022 +0100 (2022-02-03) | 
| parents | 32cc544d5a5b | 
| children | 
 line source
     1 slot.set_layout(nil, "application/json")
     3 local r = json.object{}
     5 if not app.scopes.notify_email then
     6   return util.api_error(403, "Forbidden", "insufficient_scope", "Scope notify_email required")
     7 end
     9 if app.access_token.member.notify_email ~= "" then
    10   r.notify_email = app.access_token.member.notify_email
    11 else
    12   r.notify_email = json.null
    13 end
    15 slot.put_into("data", json.export(json.object{ result = r }))
    16 slot.put_into("data", "\n")
