Skip to content

Commit

Permalink
GRANT-393: broader review form styles (#105)
Browse files Browse the repository at this point in the history
* style updates and lint fixes
  • Loading branch information
alva-fresh authored and jerry-ey committed May 27, 2024
1 parent e484b5b commit 416cb1b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions api/src/database/scripts/sync-chefs-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,14 @@ export class SyncChefsDataService {
responseType,
};
const files = await this.attachmentService.getAllAttachments(false);
if (!token) Logger.error(`No TOKEN found`);

for (const file of files) {
try {
Logger.log(`Fetching attachment - ${file.id}`);
// Get file data form server
const url = FILE_URL + file.url;
const fileRes = await axios({ ...options, url });
Logger.log(`File fetched successfully - ${file.id}`);
const fileData = Buffer.from(fileRes.data);
Logger.log(`Buffer extracted successfully - ${file.id}`);
file.data = fileData;
await this.attachmentService.updateAttachment(file);
} catch (error) {
Expand Down

0 comments on commit 416cb1b

Please sign in to comment.