Skip to content

Commit 7837e86

Browse files
committed
fix: correct buffer variable name and update thumbnail background color generation
- Renamed 'fileData' to 'fileBuffer' for clarity in the UploadSongDto structure. - Changed the method for generating the thumbnail background color from 'faker.internet.color()' to 'faker.color.rgb({ format: 'hex' })' for improved color accuracy.
1 parent ebf4290 commit 7837e86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/backend/src/seed/seed.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export class SeedService {
109109

110110
const body: UploadSongDto = {
111111
file: {
112-
buffer: fileData,
112+
buffer: fileBuffer,
113113
size: fileBuffer.length,
114114
mimetype: 'application/octet-stream',
115115
originalname: `${faker.music.songName()}.nbs`,
@@ -125,7 +125,7 @@ export class SeedService {
125125
category: faker.helpers.arrayElement(categories) as CategoryType,
126126
customInstruments: [],
127127
thumbnailData: {
128-
backgroundColor: faker.internet.color(),
128+
backgroundColor: faker.color.rgb({ format: 'hex' }),
129129
startLayer: faker.helpers.rangeToNumber({ min: 0, max: 4 }),
130130
startTick: faker.helpers.rangeToNumber({ min: 0, max: 100 }),
131131
zoomLevel: faker.helpers.rangeToNumber({ min: 1, max: 5 }),

0 commit comments

Comments
 (0)