Skip to content

Commit

Permalink
Merge pull request #35 from kinde-oss/dave/page-router-org-creation
Browse files Browse the repository at this point in the history
Create org with pages router
  • Loading branch information
evgenyk authored Jun 29, 2023
2 parents ef88aff + 21da304 commit cebbc5d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/handlers/pageRouter/createOrg.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import {prepareForRedirect} from '../../utils/pageRouter/prepareForRedirect';

export const createOrg = async (req, res) => {
const options = req.query;
const {org_name = '', start_page = 'registration'} = options;

const authUrl = prepareForRedirect(options, 'login', res);
const {org_name = ''} = req.query.options;
const options = {
org_name,
is_create_org: true
};
const authUrl = prepareForRedirect(options, 'register', res);

res.redirect(authUrl);
};

0 comments on commit cebbc5d

Please sign in to comment.