Remove unnecessary fileds in log related response

This commit is contained in:
kagami 2024-07-11 10:32:42 +08:00
parent 718d2824f0
commit 0910fbf1ec
2 changed files with 3 additions and 7 deletions

View File

@ -281,7 +281,7 @@ export async function deleteChatMessageBase(message:{'hash': string}): Promise<b
// delete the message by devchatClient
const res = await dcClient.deleteLog(message.hash);
assertValue(!res.success, res.error || "Failed to delete message from devchat client");
assertValue(!res.success, "Failed to delete message from devchat client");
return true;
} catch (error: any) {

View File

@ -64,12 +64,10 @@ export interface LogData {
export interface LogInsertRes {
hash?: string;
error?: string;
}
export interface LogDeleteRes {
success?: boolean;
error?: string;
}
export interface ShortLog {
@ -314,7 +312,6 @@ export class DevChatClient {
const res: LogInsertRes = {
hash: response.data["hash"],
error: response.data["error"],
};
return res;
}
@ -333,13 +330,12 @@ export class DevChatClient {
response.data
)}, ${typeof response.data}}`
);
const res: LogDeleteRes = {
success: response.data["success"],
error: response.data["error"],
};
return res;
}
}
@timeThis
async getTopicLogs(