File tree Expand file tree Collapse file tree 3 files changed +13
-21
lines changed
Expand file tree Collapse file tree 3 files changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -16,29 +16,23 @@ export class Report {
1616 title : string ;
1717
1818 @ApiProperty ( { description : 'Whether the report is bookmarked' } )
19- bookmark : boolean ;
19+ bookmarked : boolean ;
2020
2121 @ApiProperty ( { description : 'Category of the report' } )
2222 category : string ;
2323
2424 @ApiProperty ( { description : 'Date of the report' } )
2525 date : string ;
2626
27- @ApiProperty ( { description : 'Doctor associated with the report' } )
28- doctor : string ;
29-
30- @ApiProperty ( { description : 'Facility where the report was created' } )
31- facility : string ;
32-
3327 @ApiProperty ( {
3428 description : 'Status of the report' ,
3529 enum : ReportStatus ,
3630 default : ReportStatus . UNREAD ,
3731 } )
3832 status : ReportStatus ;
3933
40- @ApiProperty ( { description : 'File URL of the report' } )
41- fileUrl : string ;
34+ @ApiProperty ( { description : 'File path of the report' } )
35+ filePath : string ;
4236
4337 @ApiProperty ( { description : 'Creation timestamp' } )
4438 createdAt : string ;
Original file line number Diff line number Diff line change @@ -117,22 +117,22 @@ export class ReportsController {
117117 schema : {
118118 type : 'object' ,
119119 properties : {
120- fileUrl : {
120+ filePath : {
121121 type : 'string' ,
122- description : 'S3 file URL for the report' ,
122+ description : 'S3 file path for the report' ,
123123 } ,
124124 } ,
125- required : [ 'fileUrl ' ] ,
125+ required : [ 'filePath ' ] ,
126126 } ,
127- description : 'S3 file URL for the report' ,
127+ description : 'S3 file path for the report' ,
128128 } )
129129 @Post ( )
130130 async createReport (
131- @Body ( 'fileUrl ' ) fileUrl : string ,
131+ @Body ( 'filePath ' ) filePath : string ,
132132 @Req ( ) request : RequestWithUser ,
133133 ) : Promise < Report > {
134134 const userId = this . extractUserId ( request ) ;
135- return this . reportsService . saveReport ( fileUrl , userId ) ;
135+ return this . reportsService . saveReport ( filePath , userId ) ;
136136 }
137137
138138 private extractUserId ( request : RequestWithUser ) : string {
Original file line number Diff line number Diff line change @@ -253,8 +253,8 @@ export class ReportsService {
253253 }
254254 }
255255
256- async saveReport ( fileUrl : string , userId : string ) : Promise < Report > {
257- if ( ! fileUrl ) {
256+ async saveReport ( filePath : string , userId : string ) : Promise < Report > {
257+ if ( ! filePath ) {
258258 throw new NotFoundException ( 'File URL is required' ) ;
259259 }
260260
@@ -266,13 +266,11 @@ export class ReportsService {
266266 const newReport : Report = {
267267 id : uuidv4 ( ) ,
268268 userId,
269- fileUrl ,
269+ filePath ,
270270 title : 'New Report' ,
271- bookmark : false ,
271+ bookmarked : false ,
272272 category : '' ,
273273 date : '' ,
274- doctor : '' ,
275- facility : '' ,
276274 status : ReportStatus . UNREAD ,
277275 createdAt : new Date ( ) . toISOString ( ) ,
278276 updatedAt : new Date ( ) . toISOString ( ) ,
You can’t perform that action at this time.
0 commit comments