fixxed color selector in the category settings and fixxed drag and drop
Build APK / build (push) Canceled after 2m0s

subtask
This commit is contained in:
2026-08-09 21:42:54 +02:00
parent 4b6e87c979
commit 4c3d1a118c
99 changed files with 3335 additions and 920 deletions
+18 -14
View File
@@ -116,15 +116,17 @@ router.post('/', asyncHandler(async (req: Request, res: Response) => {
const userId = req.user!.userId;
const now = Date.now();
// Verify category exists and belongs to user
const cat = await db
.select()
.from(categories)
.where(and(eq(categories.id, data.categoryId), eq(categories.userId, userId)))
.limit(1);
// Verify category exists and belongs to user (optional - tasks may be uncategorized)
if (data.categoryId) {
const cat = await db
.select()
.from(categories)
.where(and(eq(categories.id, data.categoryId), eq(categories.userId, userId)))
.limit(1);
if (cat.length === 0) {
throw new AppError('NOT_FOUND', 'Category not found', 404);
if (cat.length === 0) {
throw new AppError('NOT_FOUND', 'Category not found', 404);
}
}
const taskId = `task_${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`;
@@ -261,12 +263,14 @@ router.post('/batch', asyncHandler(async (req: Request, res: Response) => {
for (const op of operations) {
try {
if (op.type === 'create') {
const cat = await db
.select()
.from(categories)
.where(and(eq(categories.id, op.data.categoryId), eq(categories.userId, userId)))
.limit(1);
if (cat.length === 0) throw new AppError('NOT_FOUND', 'Category not found', 404);
if (op.data.categoryId) {
const cat = await db
.select()
.from(categories)
.where(and(eq(categories.id, op.data.categoryId), eq(categories.userId, userId)))
.limit(1);
if (cat.length === 0) throw new AppError('NOT_FOUND', 'Category not found', 404);
}
const taskId = `task_${Date.now().toString(36)}${Math.random().toString(36).slice(2, 6)}`;
const now = Date.now();