diff --git a/http-requests/notification/task/endpoints/notice.http b/http-requests/notification/notice/endpoints/create.http similarity index 95% rename from http-requests/notification/task/endpoints/notice.http rename to http-requests/notification/notice/endpoints/create.http index b0e0e0e9..2d7a96e6 100644 --- a/http-requests/notification/task/endpoints/notice.http +++ b/http-requests/notification/notice/endpoints/create.http @@ -1,4 +1,4 @@ -### Create email all task with full check up mode +### Create multiply (batch) notices POST http://127.0.0.1:8001/ms/notification Accept: application/json Content-Type: application/json diff --git a/http-requests/notification/notice/endpoints/update.http b/http-requests/notification/notice/endpoints/update.http new file mode 100644 index 00000000..f9e5ddfe --- /dev/null +++ b/http-requests/notification/notice/endpoints/update.http @@ -0,0 +1,19 @@ +### Update notice (view) +POST http://127.0.0.1:8001/ms/notification +Accept: application/json +Content-Type: application/json + +{ + "id": "1", + "method": "notice.update", + "params": { + "fields": { + "isViewed": true + }, + "query": { + "where": { + "id": "4beace43-5231-400d-b0cf-40bc07cabe2a" + } + } + } +} diff --git a/microservices/notification/src/entities/notice.ts b/microservices/notification/src/entities/notice.ts index 1532a735..0a4d0e7b 100644 --- a/microservices/notification/src/entities/notice.ts +++ b/microservices/notification/src/entities/notice.ts @@ -49,6 +49,7 @@ class Notice { @Column({ type: 'uuid', default: null }) @Length(1, 36) @IsUndefinable() + @IsNullable() taskId: string | null; @Column({ type: 'varchar' })