You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using mysql and nestjs, here's my code:
`async patchTask(id: number, updateTaskDto: TUpdateTaskDTO) {
console.log('\nReceived updateTaskDto:', updateTaskDto);
if (id == null || isNaN(id)) {
throw new Error('Invalid task id');
}
if (!updateTaskDto) {
throw new Error('No data to update');
}
if (updateTaskDto.task_name) {
updateTaskDto.task_name = updateTaskDto.task_name;
}
if (updateTaskDto.is_complected) {
updateTaskDto.is_complected = updateTaskDto.is_complected;
}
console.log('\nUpdating task with ID:', id);
console.log('Update data:', updateTaskDto, '\n');
const [updateTask] = await this.drizzleTrello
.update(schema.ColumnsTask)
.set(updateTaskDto)
.where(eq(schema.ColumnsTask.task_id, id));
return {
updateTask,
};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using mysql and nestjs, here's my code:
`async patchTask(id: number, updateTaskDto: TUpdateTaskDTO) {
console.log('\nReceived updateTaskDto:', updateTaskDto);
}`
Beta Was this translation helpful? Give feedback.
All reactions