Simplify chat API to use plaintext instead of encrypted fields
This commit is contained in:
+1
-12
@@ -4,8 +4,7 @@ export interface ChatMessage {
|
||||
id: string;
|
||||
senderId: string;
|
||||
recipientId: string;
|
||||
encryptedContent: string;
|
||||
iv: string;
|
||||
content: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@@ -39,13 +38,3 @@ export async function deleteMessage(messageId: string) {
|
||||
const { data } = await apiClient.delete(`/chat/messages/${messageId}`);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function getUserPublicKey(userId: string): Promise<{ id: string; chatPublicKey: string | null }> {
|
||||
const { data } = await apiClient.get(`/users/${userId}/public-key`);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function updateMyPublicKey(chatPublicKey: string) {
|
||||
const { data } = await apiClient.put('/users/me/public-key', { chatPublicKey });
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user