mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 22:14:05 +00:00
Fix: Handle json correctly on delete response recieved
This commit is contained in:
1 parent
2c25f4a4c0
commit
b442cc186a
1 file changed
+2
-1
@@ -42,7 +42,8 @@ export default function APIKeys() {
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
data.status === 'ok' &&
|
||||
console.log(data);
|
||||
data.success === true &&
|
||||
setApiKeys((previous) => previous.filter((elem) => elem.id !== id));
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in new issue
Block a user