docs: fix redirect

This commit is contained in:
Jan De Dobbeleer 2022-01-09 21:54:30 +01:00
parent d107f0af1c
commit 6f0bdab9b2
No known key found for this signature in database
GPG key ID: F6CC273CE5BA9AEE

View file

@ -33,14 +33,14 @@ module.exports = async function (context, req) {
const url = `${process.env['DOCS_LOCATION']}/docs/auth?segment=${segment}&access_token=${body.access_token}&refresh_token=${body.refresh_token}`; const url = `${process.env['DOCS_LOCATION']}/docs/auth?segment=${segment}&access_token=${body.access_token}&refresh_token=${body.refresh_token}`;
const res = { context.res = {
status: 302, status: 302,
headers: { headers: {
'Location': url Location: url
}, },
body: 'Redirecting...' body: {}
}; }
context.done(null, res); context.done();
} catch (error) { } catch (error) {
context.log(`Issue processing request:\n${error}`); context.log(`Issue processing request:\n${error}`);
context.res = { context.res = {