♻️ Refactor: Remove unused variables
This commit is contained in:
parent
d687608ba8
commit
4527be0328
2 changed files with 9 additions and 9 deletions
6
main.go
6
main.go
|
@ -84,7 +84,7 @@ func main() {
|
|||
exists := checkDatabaseExists(db, dbName)
|
||||
|
||||
if !exists {
|
||||
createDatabase(db, dbName)
|
||||
createDatabase(db)
|
||||
}
|
||||
|
||||
db = connectToNotatioDatabase(dbHost, dbPort, dbUser, dbPassword, dbName, dbSSLMode)
|
||||
|
@ -167,7 +167,7 @@ func handleUsernameCheck(w http.ResponseWriter, r *http.Request) {
|
|||
w.Write(jsonResponse)
|
||||
}
|
||||
|
||||
func handleInternalServerError(w http.ResponseWriter, err error) {
|
||||
func handleInternalServerError(err error) {
|
||||
log.Printf("Error: %v", err)
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ func checkDatabaseExists(db *sql.DB, dbName string) bool {
|
|||
return exists
|
||||
}
|
||||
|
||||
func createDatabase(db *sql.DB, dbName string) {
|
||||
func createDatabase(db *sql.DB) {
|
||||
log.Println("Notatio database does not exist. Creating Database...")
|
||||
_, err := db.Exec("CREATE DATABASE notatio")
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue