Skip to content

Commit

Permalink
[backend] fix file name change
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyCloarec committed Nov 27, 2024
1 parent 4018441 commit e02c02e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const findAll = (context: AuthContext, user: AuthUser, args: QueryExclusi
};

const storeAndCreateExclusionList = async (context: AuthContext, user: AuthUser, input: ExclusionListContentAddInput | ExclusionListFileAddInput, file: FileUploadData) => {
const exclusionFile = { ...file, filename: `${input.name}.txt` };
const fullFile = await file;
const exclusionFile = { ...fullFile, filename: `${input.name}.txt` };
const { upload } = await uploadToStorage(context, user, filePath, exclusionFile, {});

const exclusionListToCreate = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('Exclusion list resolver', () => {

it('should create an exclusion list', async () => {
expect(exclusionListFileResponse.id).toBeDefined();
expect(exclusionListFileResponse.file_id).toBe('exclusionLists/testfileexclusionlist.txt');
expect(exclusionListFileResponse.file_id).toBe('exclusionLists/test_name_file.txt');
});

it('should create a file', async () => {
Expand Down

0 comments on commit e02c02e

Please sign in to comment.