1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-27 10:58:13 +02:00
immich/server/e2e/client/asset-api.ts
2024-03-09 12:51:58 -05:00

11 lines
360 B
TypeScript

import { AssetResponseDto } from '@app/domain';
import request from 'supertest';
export const assetApi = {
getAllAssets: async (server: any, accessToken: string) => {
const { body, status } = await request(server).get(`/asset/`).set('Authorization', `Bearer ${accessToken}`);
expect(status).toBe(200);
return body as AssetResponseDto[];
},
};