-
-
Notifications
You must be signed in to change notification settings - Fork 206
Description
Package version
"@adonisjs/assembler": "^7.8.2"
Describe the bug
in the documentation that is how we can do an update request with the OrM lucid await
user.merge({ lastLoginAt: DateTime.local() }).save()
and there is my example
async update(categoryId: string, payload: any) { try { const category = await Category.findBy('slug', categoryId); if (!category) { return { error: 'Category not found' }; } category.merge({ ...payload }).save() return category; } catch (error) { return { error: error.message || 'An error occurred during update' }; } }
the code working well but there is my reponse
{ "id": 7, "name": "Soerereferf", "createdAt": "2024-11-23T17:33:46.000+00:00", "updatedAt": "2024-11-23T16:53:33.546+00:00", "isActive": 0, "slug": "d19f8bc7-b39d-4015-a8f7-71d1da5b0126" }
how my updatedAt date can be before my createdAt date ?