Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

fix(tags): allow for uppercase tag color code (#346)

Alexc54a71d2c599
diff --git a/.changeset/few-toes-ask.md b/.changeset/few-toes-ask.md
new file mode 100644
index 00000000..354b9048
--- /dev/null
+++ b/.changeset/few-toes-ask.md
@@ -0,0 +1,5 @@
+---
+"@papra/app-client": patch
+---
+
+Fixes 400 error when submitting tags with uppercase hex colour codes.
diff --git a/apps/papra-client/src/modules/tags/pages/tags.page.tsx b/apps/papra-client/src/modules/tags/pages/tags.page.tsx
index ac74772f..688efe4e 100644
--- a/apps/papra-client/src/modules/tags/pages/tags.page.tsx
+++ b/apps/papra-client/src/modules/tags/pages/tags.page.tsx
@@ -119,7 +119,7 @@ export const CreateTagModal: Component<{
const onSubmit = async ({ name, color, description }: { name: string; color: string; description: string }) => {
const [,error] = await safely(createTag({
name,
- color,
+ color: color.toLowerCase(),
description,
organizationId: props.organizationId,
}));
@@ -170,7 +170,7 @@ const UpdateTagModal: Component<{
const onSubmit = async ({ name, color, description }: { name: string; color: string; description: string }) => {
await updateTag({
name,
- color,
+ color: color.toLowerCase(),
description,
organizationId: props.organizationId,
tagId: props.tag.id,