Files
dashlibstorage/src/store/mcp/deleteClient.js
2026-10-12 22:32:21 +02:00

17 lines
585 B
JavaScript

import { DELETE_CLIENT as MSSQL_DELETE } from '../../providers/mssql/queries/mcp.js';
import { DELETE_CLIENT as SQLITE_DELETE } from '../../providers/sqlite3/queries/mcp.js';
export default function deleteClient(provider) {
const sql = provider.dialect === 'sqlite3' ? SQLITE_DELETE : MSSQL_DELETE;
/**
* Deletes a registered MCP client by client ID.
*
* @param {string} clientId - The client identifier to delete.
* @returns {Promise<boolean>} True if deleted.
*/
return async (clientId) => {
await provider.query(sql, { clientId });
return true;
};
}