import pool from "../../db";
import * as mariadb from 'mariadb';


export async function cancelLatestUnit(userID: number, con: mariadb.Pool | mariadb.Connection = pool): Promise<boolean> {
    try {
        let sql = `CALL sp_end_member_unit(?,NOW())`;
        con.query(sql, [userID]);
        return true;
    } catch (error) {
        throw error;
    }
}