sonar fixes
This commit is contained in:
parent
d45cc89eec
commit
93375585c1
|
@ -22,7 +22,7 @@ export const apiKeyDelete = async (requestEvent: Deno.RequestEvent, query: Map<s
|
||||||
|
|
||||||
await dbClient.execute('DELETE FROM allowed_channels WHERE userid = ?', [apiUserid]).catch((e) => {
|
await dbClient.execute('DELETE FROM allowed_channels WHERE userid = ?', [apiUserid]).catch((e) => {
|
||||||
log(LT.ERROR, `Failed to insert into database: ${JSON.stringify(e)}`);
|
log(LT.ERROR, `Failed to insert into database: ${JSON.stringify(e)}`);
|
||||||
requestEvent.respondWith(stdResp.InternalServerError(''));
|
requestEvent.respondWith(stdResp.InternalServerError('Channel Clean Failed'));
|
||||||
erroredOut = true;
|
erroredOut = true;
|
||||||
});
|
});
|
||||||
if (erroredOut) {
|
if (erroredOut) {
|
||||||
|
@ -31,7 +31,7 @@ export const apiKeyDelete = async (requestEvent: Deno.RequestEvent, query: Map<s
|
||||||
|
|
||||||
await dbClient.execute('DELETE FROM all_keys WHERE userid = ?', [apiUserid]).catch((e) => {
|
await dbClient.execute('DELETE FROM all_keys WHERE userid = ?', [apiUserid]).catch((e) => {
|
||||||
log(LT.ERROR, `Failed to insert into database: ${JSON.stringify(e)}`);
|
log(LT.ERROR, `Failed to insert into database: ${JSON.stringify(e)}`);
|
||||||
requestEvent.respondWith(stdResp.InternalServerError(''));
|
requestEvent.respondWith(stdResp.InternalServerError('Delete Key Failed'));
|
||||||
erroredOut = true;
|
erroredOut = true;
|
||||||
});
|
});
|
||||||
if (erroredOut) {
|
if (erroredOut) {
|
||||||
|
@ -54,7 +54,7 @@ export const apiKeyDelete = async (requestEvent: Deno.RequestEvent, query: Map<s
|
||||||
// Execute the DB modification
|
// Execute the DB modification
|
||||||
await dbClient.execute('UPDATE all_keys SET deleteCode = ? WHERE userid = ?', [deleteCode, apiUserid]).catch((e) => {
|
await dbClient.execute('UPDATE all_keys SET deleteCode = ? WHERE userid = ?', [deleteCode, apiUserid]).catch((e) => {
|
||||||
log(LT.ERROR, `Failed to insert into database: ${JSON.stringify(e)}`);
|
log(LT.ERROR, `Failed to insert into database: ${JSON.stringify(e)}`);
|
||||||
requestEvent.respondWith(stdResp.InternalServerError(''));
|
requestEvent.respondWith(stdResp.InternalServerError('Delete Code Failed'));
|
||||||
erroredOut = true;
|
erroredOut = true;
|
||||||
});
|
});
|
||||||
if (erroredOut) {
|
if (erroredOut) {
|
||||||
|
|
Loading…
Reference in New Issue