diff --git a/src/modules/storage-explorer/storage-explorer.controller.ts b/src/modules/storage-explorer/storage-explorer.controller.ts index a18f4a9..34884da 100644 --- a/src/modules/storage-explorer/storage-explorer.controller.ts +++ b/src/modules/storage-explorer/storage-explorer.controller.ts @@ -348,20 +348,19 @@ export class StorageExplorerController { ); } - @ApiOperation({ summary: 'Delete a file from storage' }) - @Delete('storage/delete') + @ApiOperation({ summary: 'Link an existing file in storage to a table' }) + @Post('storage/link-to-table') @Authenticated() @RequireAllPermissions(PERMISSIONS_GROUPS.STORAGE_EXPLORER.permissions.WRITE) - async deleteFile( - @Query('file_path') filePath: string, + async linkFileToTable( + @Body() body: any, @User() user: RequestUser, ) { return this.storageExplorerService.proxy( - 'DELETE', - '/storage/delete', + 'POST', + '/storage/link-to-table', user, - undefined, - { file_path: filePath }, + body, ); }