u
This commit is contained in:
16
src/store/mcp/deleteClient.js
Normal file
16
src/store/mcp/deleteClient.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user