import { Request as ExpressRequest, Response as ExpressResponse } from "express";

interface CodeResponse {
    code?: string;
}

export const get = async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
    const data = req.query as CodeResponse;
    if (req.session) {
        req.session.authTokenCode = data.code;
    }
    res.redirect("/login/discord_auth");
};
