🗃️ changed db variables
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
ed474d4433
commit
b6123ceb02
4 changed files with 9 additions and 3 deletions
|
@ -143,5 +143,5 @@ func main() {
|
|||
|
||||
// Run the server on port 8080
|
||||
router.Run(":8080")
|
||||
//db.SetupDb()
|
||||
// db.SetupDb()
|
||||
}
|
||||
|
|
|
@ -62,6 +62,12 @@ func SetupDb() {
|
|||
empati INT,
|
||||
hjelpsomhet INT
|
||||
);`,
|
||||
`CREATE TABLE IF NOT EXISTS Evaluering (
|
||||
evalueringtekst TEXT
|
||||
);`,
|
||||
`CREATE TABLE IF NOT EXISTS FeilRapport (
|
||||
feiltekst TEXT
|
||||
);`,
|
||||
}
|
||||
|
||||
// Execute SQL statements
|
||||
|
|
|
@ -28,7 +28,7 @@ func InsertBugReport(bugText string) (error) {
|
|||
}
|
||||
|
||||
insertStatement := `
|
||||
INSERT INTO FeilRapport (feilTekst)
|
||||
INSERT INTO FeilRapport (feiltekst)
|
||||
VALUES ($1)
|
||||
`
|
||||
stmt, err := db.Prepare(insertStatement)
|
||||
|
|
|
@ -28,7 +28,7 @@ func InsertEvaluation(evaluationText string) (error) {
|
|||
}
|
||||
|
||||
insertStatement := `
|
||||
INSERT INTO Evaluering (evalueringTekst)
|
||||
INSERT INTO Evaluering (evalueringtekst)
|
||||
VALUES ($1)
|
||||
`
|
||||
stmt, err := db.Prepare(insertStatement)
|
||||
|
|
Reference in a new issue