Skip to content

Commit 0704c54

Browse files
committed
refactor: reorganize thumbnail constants and update song preview DTO to use specific visibility type
1 parent 0d07788 commit 0704c54

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

packages/configs/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
console.log('Hello via Bun!');
1+
// Entry point for the configs package

packages/configs/src/song.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
import { BG_COLORS } from './colors';
2-
3-
export const THUMBNAIL_CONSTANTS = {
4-
zoomLevel: {
5-
min : 1,
6-
max : 5,
7-
default: 3
8-
},
9-
startTick: {
10-
default: 0
11-
},
12-
startLayer: {
13-
default: 0
14-
},
15-
backgroundColor: {
16-
default: BG_COLORS.gray.dark
17-
}
18-
} as const;
19-
201
export const MIMETYPE_NBS = 'application/octet-stream' as const;
212

223
export const UPLOAD_CONSTANTS = {

packages/configs/src/thumbnail.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { BG_COLORS } from './colors';
2+
3+
export const THUMBNAIL_CONSTANTS = {
4+
zoomLevel: {
5+
min : 1,
6+
max : 5,
7+
default: 3
8+
},
9+
startTick: {
10+
default: 0
11+
},
12+
startLayer: {
13+
default: 0
14+
},
15+
backgroundColor: {
16+
default: BG_COLORS.gray.dark
17+
}
18+
} as const;

packages/database/src/song/dto/SongPreview.dto.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { IsNotEmpty, IsString, IsUrl, MaxLength } from 'class-validator';
22

33
import type { SongWithUser } from '../entity/song.entity';
44

5+
import type { VisibilityType } from './types';
6+
57
type SongPreviewUploader = {
68
username : string;
79
profileImage: string;
@@ -50,7 +52,7 @@ export class SongPreviewDto {
5052

5153
@IsNotEmpty()
5254
@IsString()
53-
visibility: string;
55+
visibility: VisibilityType;
5456

5557
constructor(partial: Partial<SongPreviewDto>) {
5658
Object.assign(this, partial);

0 commit comments

Comments
 (0)