bsw/jbe@1309: slot.set_layout(nil, "application/json") bsw/jbe@1309: bsw/jbe@1309: local r = json.object{} bsw/jbe@1309: bsw/jbe@1309: if not app.scopes.notify_email then bsw/jbe@1309: return util.api_error(403, "Forbidden", "insufficient_scope", "Scope notify_email required") bsw/jbe@1309: end bsw/jbe@1309: bsw/jbe@1309: if app.access_token.member.notify_email ~= "" then bsw/jbe@1309: r.notify_email = app.access_token.member.notify_email bsw/jbe@1309: else bsw/jbe@1309: r.notify_email = json.null bsw/jbe@1309: end bsw/jbe@1309: bsw/jbe@1309: slot.put_into("data", json.export(json.object{ result = r })) bsw/jbe@1309: slot.put_into("data", "\n")