Adding a isblank check
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 29s
Music Collection CI Workflow / test (./frontend) (push) Successful in 35s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 50s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m45s
Music Collection CI Workflow / deploy (push) Successful in 24s
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 29s
Music Collection CI Workflow / test (./frontend) (push) Successful in 35s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 50s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m45s
Music Collection CI Workflow / deploy (push) Successful in 24s
This commit is contained in:
parent
27be45b284
commit
5b6a6004da
@ -46,7 +46,7 @@ export default function Page() {
|
||||
|
||||
const formData = new FormData(event.currentTarget);
|
||||
try {
|
||||
if (StringUtils.isBlank(formData.get('id'))) {
|
||||
if (StringUtils.isBlank(formData.get('id') as string)) {
|
||||
const data = await createSong(formData);
|
||||
console.log(data);
|
||||
} else {
|
||||
@ -108,7 +108,6 @@ export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<div className="container">
|
||||
<div className="eight columns">
|
||||
<div>
|
||||
<em>{album.title}</em> by {album.artist} ({album.genre})
|
||||
</div>
|
||||
@ -143,7 +142,6 @@ export default function Page() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Modal
|
||||
show={show}
|
||||
|
@ -40,7 +40,7 @@ export default function Page() {
|
||||
|
||||
const formData = new FormData(event.currentTarget);
|
||||
try {
|
||||
if (StringUtils.isBlank(formData.get('id'))) {
|
||||
if (StringUtils.isBlank(formData.get('id') as string)) {
|
||||
const data = await createAlbum(formData);
|
||||
console.log(data);
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
export class StringUtils {
|
||||
static isBlank(str) {
|
||||
static isBlank(str: string) {
|
||||
return (!str || /^\s*$/.test(str));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user