Fixing validator
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 29s
Music Collection CI Workflow / test (./frontend) (push) Successful in 36s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m54s
Music Collection CI Workflow / deploy (push) Successful in 25s
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 29s
Music Collection CI Workflow / test (./frontend) (push) Successful in 36s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m54s
Music Collection CI Workflow / deploy (push) Successful in 25s
This commit is contained in:
parent
a1c33e1b0a
commit
495f56aa2b
@ -2,12 +2,12 @@ import { Entity, Column, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
|||||||
import { IsNotEmpty, IsString } from 'class-validator';
|
import { IsNotEmpty, IsString } from 'class-validator';
|
||||||
import { Song } from '../song/song.entity';
|
import { Song } from '../song/song.entity';
|
||||||
|
|
||||||
@Entity()
|
@Entity("album")
|
||||||
export class Album {
|
export class Album {
|
||||||
@PrimaryGeneratedColumn()
|
@PrimaryGeneratedColumn()
|
||||||
id: number
|
id: number
|
||||||
|
|
||||||
@Column()
|
@Column({ unique: true })
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
title: string
|
title: string
|
||||||
|
@ -12,7 +12,7 @@ async function bootstrap() {
|
|||||||
credentials: true,
|
credentials: true,
|
||||||
allowedHeaders: 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept, Observe',
|
allowedHeaders: 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept, Observe',
|
||||||
});
|
});
|
||||||
app.useGlobalPipes(new ValidationPipe());
|
app.useGlobalPipes(new ValidationPipe({transform: true}));
|
||||||
await app.listen(process.env.PORT ?? 3000);
|
await app.listen(process.env.PORT ?? 3000);
|
||||||
}
|
}
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
@ -2,12 +2,12 @@ import { Entity, Column, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
|||||||
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';
|
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';
|
||||||
import { Album } from '../album/album.entity';
|
import { Album } from '../album/album.entity';
|
||||||
|
|
||||||
@Entity()
|
@Entity("song")
|
||||||
export class Song {
|
export class Song {
|
||||||
@PrimaryGeneratedColumn()
|
@PrimaryGeneratedColumn()
|
||||||
id: number
|
id: number
|
||||||
|
|
||||||
@Column()
|
@Column({ unique: true })
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
title: string
|
title: string
|
||||||
|
6
frontend/package-lock.json
generated
6
frontend/package-lock.json
generated
@ -13,6 +13,7 @@
|
|||||||
"@mui/icons-material": "^7.0.1",
|
"@mui/icons-material": "^7.0.1",
|
||||||
"@mui/material": "^7.0.1",
|
"@mui/material": "^7.0.1",
|
||||||
"bootstrap": "^5.3.5",
|
"bootstrap": "^5.3.5",
|
||||||
|
"class-transformer": "^0.5.1",
|
||||||
"next": "15.2.4",
|
"next": "15.2.4",
|
||||||
"primereact": "^10.9.4",
|
"primereact": "^10.9.4",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
@ -3996,6 +3997,11 @@
|
|||||||
"integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==",
|
"integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/class-transformer": {
|
||||||
|
"version": "0.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz",
|
||||||
|
"integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw=="
|
||||||
|
},
|
||||||
"node_modules/classnames": {
|
"node_modules/classnames": {
|
||||||
"version": "2.5.1",
|
"version": "2.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
"@mui/icons-material": "^7.0.1",
|
"@mui/icons-material": "^7.0.1",
|
||||||
"@mui/material": "^7.0.1",
|
"@mui/material": "^7.0.1",
|
||||||
"bootstrap": "^5.3.5",
|
"bootstrap": "^5.3.5",
|
||||||
|
"class-transformer": "^0.5.1",
|
||||||
"next": "15.2.4",
|
"next": "15.2.4",
|
||||||
"primereact": "^10.9.4",
|
"primereact": "^10.9.4",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
|
@ -46,7 +46,6 @@ export default function Page() {
|
|||||||
await updateAlbum(formData);
|
await updateAlbum(formData);
|
||||||
}
|
}
|
||||||
revalidateAlbums();
|
revalidateAlbums();
|
||||||
revalidateAlbums();
|
|
||||||
const data = await getAlbums();
|
const data = await getAlbums();
|
||||||
setAlbums(data);
|
setAlbums(data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user