Apps: get the redirect_uri into the app
This commit is contained in:
parent
9734d0a961
commit
d860ef7f98
|
@ -14,8 +14,18 @@ const FAKE_APP = {
|
|||
vapid_key: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
|
||||
};
|
||||
|
||||
function createAppController(c: Context) {
|
||||
return c.json(FAKE_APP);
|
||||
async function createAppController(c: Context) {
|
||||
// TODO: Handle both formData and json. 422 on parsing error.
|
||||
try {
|
||||
const { redirect_uris } = await c.req.json();
|
||||
|
||||
return c.json({
|
||||
...FAKE_APP,
|
||||
redirect_uri: redirect_uris || FAKE_APP.redirect_uri,
|
||||
});
|
||||
} catch (_e) {
|
||||
return c.json(FAKE_APP);
|
||||
}
|
||||
}
|
||||
|
||||
function appCredentialsController(c: Context) {
|
||||
|
|
Loading…
Reference in New Issue