Skip to content

Commit

Permalink
Smaller Bugfixes
Browse files Browse the repository at this point in the history
- Error message if Plenumsname or -number is empty
- Giving back link to new plenumspage
  • Loading branch information
philmacfly committed Dec 20, 2023
1 parent d101640 commit 84a46c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/seilfahrt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func createPage(filepath string, conf Config) error {
break
}
}
if plenumname == "" || plenumsnummer == "" {
return errors.New("error finding plenumname or plenumsnummer")
}
fmt.Println("Plenumname: ", plenumname)
fmt.Println("Creating Plenumspage with Name:", plenumname, "and Number:", plenumsnummer)

Expand Down Expand Up @@ -150,9 +153,10 @@ func createPage(filepath string, conf Config) error {
}

fmt.Println("Page created")
fmt.Println("https://wiki.nerdberg.de/" + plenumname)

fmt.Println("Updating Plenetarium page")
linkline := fmt.Sprintf("* [[%v]] #%v", plenumname, plenumsnummer)
linkline := fmt.Sprintf("* [[%v]] #%v\n", plenumname, plenumsnummer)
pageEditParameters := map[string]string{
"pageid": conf.PlenenPageId,
"format": "json",
Expand Down

0 comments on commit 84a46c8

Please sign in to comment.