#How, do i get that body.session value?

1 messages · Page 1 of 1 (latest)

hushed marten
#

Pulling hair out here.

    await req(options, async function (error: string, response: string, body: {
        message: string,
        session: string,
        course: string
    }) {
        if (error) throw new Error(error);

        if (body.session) {
            setSession(body.session);
        }
    });
    

setSession(body.session) doesnt work. because its a hook.

also cant run my return redirect in there either so it needs to set session somehow.

how can i do this?

onyx summit
#

hey, it's really unclear what you're trying to do

#

what is req() ?

hushed marten
#

const req = require('request');