Adding catches
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Failing after 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) Has been skipped
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been skipped
Music Collection CI Workflow / deploy (push) Has been skipped
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Failing after 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) Has been skipped
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been skipped
Music Collection CI Workflow / deploy (push) Has been skipped
This commit is contained in:
parent
c598b221aa
commit
ea589d4562
@ -12,28 +12,34 @@ export class AlbumController {
|
|||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
findAll(): Promise<Album[]> {
|
findAll(): Promise<Album[]> {
|
||||||
|
console.log("AlbumController findAll")
|
||||||
return this.albumService.findAll();
|
return this.albumService.findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get(':id')
|
@Get(':id')
|
||||||
findOneById(@Param('id') id: number): Promise<Album | null> {
|
findOneById(@console.logremoveAlbumController findOnyById: ",id);
|
||||||
|
Param('id') id: number): Promise<Album | null> {
|
||||||
|
console.log("AlbumController findOnyById: ",id);
|
||||||
return this.albumService.findOneById(id);
|
return this.albumService.findOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
@UsePipes(new ValidationPipe({ transform: true }))
|
@UsePipes(new ValidationPipe({ transform: true }))
|
||||||
async create(@Body() createAlbumDto: CreateAlbumDto): Promise<Album | null> {
|
async create(@Body() createAlbumDto: CreateAlbumDto): Promise<Album | null> {
|
||||||
|
console.log("AlbumController create: ",createAlbumDto);
|
||||||
return this.albumService.create(createAlbumDto);
|
return this.albumService.create(createAlbumDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Put(':id')
|
@Put(':id')
|
||||||
@UsePipes(new ValidationPipe({ transform: true }))
|
@UsePipes(new ValidationPipe({ transform: true }))
|
||||||
async update(@Param('id') id: number, @Body() updateAlbumDto: UpdateAlbumDto): Promise<Album | null> {
|
async update(@Param('id') id: number, @Body() updateAlbumDto: UpdateAlbumDto): Promise<Album | null> {
|
||||||
|
console.log("AlbumController update: ",id,updateAlbumDto);
|
||||||
return this.albumService.update(id, updateAlbumDto);
|
return this.albumService.update(id, updateAlbumDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete(':id')
|
@Delete(':id')
|
||||||
async remove(@Param('id') id: number): Promise<DeleteResult> {
|
async remove(@Param('id') id: number): Promise<DeleteResult> {
|
||||||
|
console.log("AlbumController remove: ",id);
|
||||||
return this.albumService.remove(id);
|
return this.albumService.remove(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,13 @@ import { IconButton } from '@mui/material';
|
|||||||
import { AddCircleOutline, Delete, Edit } from '@mui/icons-material';
|
import { AddCircleOutline, Delete, Edit } from '@mui/icons-material';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
const params = useParams<{ id: string }>();
|
||||||
|
const albumId = params.id;
|
||||||
const [album, setAlbum] = useState<Album>();
|
const [album, setAlbum] = useState<Album>();
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
const handleClose = () => setShow(false);
|
const handleClose = () => setShow(false);
|
||||||
const handleShow = () => setShow(true);
|
const handleShow = () => setShow(true);
|
||||||
const [formAlbumId, setFormAlbumId] = useState("");
|
const [formAlbumId, setFormAlbumId] = useState(albumId);
|
||||||
const [formSongId, setFormSongId] = useState("");
|
const [formSongId, setFormSongId] = useState("");
|
||||||
const [formSongTitle, setFormSongTitle] = useState("");
|
const [formSongTitle, setFormSongTitle] = useState("");
|
||||||
const [formSongDuration, setFormSongDuration] = useState("");
|
const [formSongDuration, setFormSongDuration] = useState("");
|
||||||
@ -24,9 +26,6 @@ export default function Page() {
|
|||||||
const [formModalTitle, setFormModalTitle] = useState("Add Song");
|
const [formModalTitle, setFormModalTitle] = useState("Add Song");
|
||||||
const [formModalButtonLabel, setFormModalButtonLabel] = useState("Add");
|
const [formModalButtonLabel, setFormModalButtonLabel] = useState("Add");
|
||||||
|
|
||||||
const params = useParams<{ id: string }>();
|
|
||||||
const albumId = params.id;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchAlbum(albumId: string) {
|
async function fetchAlbum(albumId: string) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user