카테고리 페이지에서의 네트워크 호출 최적화

This commit is contained in:
static
2025-12-30 20:53:20 +09:00
parent 1e57941f4c
commit b5522a4c6d
19 changed files with 416 additions and 521 deletions

View File

@@ -17,12 +17,17 @@ export const useContext = () => {
};
export const requestCategoryRename = async (category: SelectedCategory, newName: string) => {
const newNameEncrypted = await encryptString(newName, category.dataKey);
if (!category.dataKey) {
// TODO: Error Handling
return false;
}
const newNameEncrypted = await encryptString(newName, category.dataKey.key);
try {
await trpc().category.rename.mutate({
id: category.id,
dekVersion: category.dataKeyVersion,
dekVersion: category.dataKey.version,
name: newNameEncrypted.ciphertext,
nameIv: newNameEncrypted.iv,
});