Skip to content

Commit

Permalink
13
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobrunia committed Dec 13, 2023
1 parent ca3e472 commit 3b00282
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions controlers/music-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
saveAudioToPlaylist,
savePlaylist,
} from '../services/sqlwrapper.js';
import { uuid } from 'uuidv4';
import { v1 } from 'uuid';
const readFileAsync = promisify(fs.readFile);

class MusicController {
Expand All @@ -30,7 +30,7 @@ class MusicController {
? request.files['imageFile'][0]
: null;

const trackId = uuid();
const trackId = v1();
const folderName = `${trackName}_${trackAuthor}_${trackId}`; // Генерация уникального id
const folderPath = path.join('uploads', folderName);
if (fs.existsSync(folderPath)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id: da28c9cb-3dcc-4e5b-a9be-abdaca4bb098
id: d08bb050-97e3-11ee-b9c1-3778e44074dc
trackName: 4x4
trackAuthor: Big Baby Tape
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id: 9c546ed0-97e8-11ee-b2c4-7d63b45d46c0
trackName: skoraya
trackAuthor: kakbudda

0 comments on commit 3b00282

Please sign in to comment.