17 lines
585 B
JavaScript
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;
|
|
};
|
|
}
|