import mysql from "mysql";

/**
 * # End MYSQL Connection
 */
function endConnection(connection: mysql.Connection) {
    if (connection.state !== "disconnected") {
        connection.end((err) => {
            console.log(err?.message);
        });
    }
}

export default endConnection;
