Skip to content

Commit

Permalink
feat: apply pgu
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkim04 committed Mar 6, 2024
1 parent 61b9bea commit 26da282
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
3 changes: 3 additions & 0 deletions dto/level.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export class LevelDto {
@ApiProperty({ example: 21.05 })
diff: number;

@ApiProperty({ example: 'U1' })
pgu_diff: string;

@ApiProperty({ example: 21 })
feeling: number;

Expand Down
5 changes: 1 addition & 4 deletions schemas/level.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ export class Level {
diff: number;

@Prop()
feeling: number;

@Prop()
forum: number;
pgu_diff: string;

@Prop()
vidLink: string;
Expand Down
5 changes: 2 additions & 3 deletions src/gsheets/gsheets.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ export class GsheetsService {

const result = await parseGViz(
gvizStr,
[0, 1, 2, 3, 6, 8, 10, 21, 22, 23],
[0, 1, 2, 3, 11, 7, 22, 23, 24],
[
'id',
'song',
'artist',
'creator',
'diff',
'feeling',
'forum',
'pgu_diff',
'vidLink',
'dlLink',
'workshopLink',
Expand Down
8 changes: 4 additions & 4 deletions src/levels/levels.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class LevelsService {
};
Object.entries(level).forEach(([key, value]) => {
switch (key) {
case 'id':
case 'id':
dlLink = `https://cdn.packui.net/content/t21c/${value}.zip`;
break;
case 'song':
Expand All @@ -156,9 +156,9 @@ export class LevelsService {
packUiLevel.artist = value;
break;
case 'dlLink':
// packUiLevel.download = value;
// break;
packUiLevel.download = (value !== '' ? dlLink : '');
// packUiLevel.download = value;
// break;
packUiLevel.download = value !== '' ? dlLink : '';
break;
}
});
Expand Down

0 comments on commit 26da282

Please sign in to comment.