Fix bag remove to SQLite

Still not perfect, but the problem comming from go-sqlite3 library
This commit is contained in:
chteufleur 2016-04-27 21:02:12 +02:00
parent 7d9cf97445
commit fcaa5a01bc
1 changed files with 27 additions and 28 deletions

View File

@ -88,14 +88,13 @@ func (newLine *DatabaseLine) UpdateLine() bool {
}
func RemoveLine(jid string) bool {
// Update Steam login and password to blank before deleting,
// because it is not really deleted in the SQLite file.
line := new(DatabaseLine)
line.Jid = jid
return line.UpdateLine()
line.UpdateLine()
// FIXME not working
/*
log.Printf("%sRemove line %s", LogInfo, jid)
stmt, err := db.Prepare(deleteDatabaseStmt)
if err != nil {
log.Printf("%sError on delete jid %s", LogError, jid, err)
@ -114,11 +113,11 @@ func RemoveLine(jid string) bool {
return false
}
if affect == 0 {
log.Printf("%sNo line affected", LogDebug)
return false
}
return true
*/
}
func GetLine(jid string) *DatabaseLine {