mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Apps: get the redirect_uri into the app
This commit is contained in:
parent
9734d0a961
commit
d860ef7f98
1 changed files with 12 additions and 2 deletions
|
|
@ -14,8 +14,18 @@ const FAKE_APP = {
|
||||||
vapid_key: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
|
vapid_key: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
|
||||||
};
|
};
|
||||||
|
|
||||||
function createAppController(c: Context) {
|
async function createAppController(c: Context) {
|
||||||
return c.json(FAKE_APP);
|
// 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) {
|
function appCredentialsController(c: Context) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue