Implemented load new image when navigating back from backup page (#9)

This commit is contained in:
Alex 2022-02-06 20:31:32 -06:00 committed by GitHub
parent 1d3ee2008c
commit c24fb403c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 133 additions and 38 deletions

View file

@ -29,6 +29,7 @@ import { Response as Res } from 'express';
import { promisify } from 'util';
import { stat } from 'fs';
import { pipeline } from 'stream';
import { GetNewAssetQueryDto } from './dto/get-new-asset-query.dto';
const fileInfo = promisify(stat);
@ -141,6 +142,11 @@ export class AssetController {
console.log('SHOULD NOT BE HERE');
}
@Get('/new')
async getNewAssets(@GetAuthUser() authUser: AuthUserDto, @Query(ValidationPipe) query: GetNewAssetQueryDto) {
return await this.assetService.getNewAssets(authUser, query.latestDate);
}
@Get('/all')
async getAllAssets(@GetAuthUser() authUser: AuthUserDto, @Query(ValidationPipe) query: GetAllAssetQueryDto) {
return await this.assetService.getAllAssets(authUser, query);