"use strict";
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const redeem_verify_email_1 = __importDefault(require("@cocalc/server/auth/redeem-verify-email"));
const get_params_1 = __importDefault(require("lib/api/get-params"));
async function redeemVerifyEmailAPICall(req, res) {
    const { email_address, token } = (0, get_params_1.default)(req);
    try {
        await (0, redeem_verify_email_1.default)(email_address, token);
    }
    catch (err) {
        res.json({ error: `${err.message}` });
        return;
    }
    res.json({});
    return;
}
exports.default = redeemVerifyEmailAPICall;
//# sourceMappingURL=redeem-verify-email.js.map