Little profile refactoring and favorite server adding fix.

Done some refactoring on profiles handling. Too small, but deserve
these two lines in commit.

Fixed favorite server addition from scratch.
This commit is contained in:
pztrn committed 2017-05-13 01:08:56 +05:00
1 parent a6d53a3fd9
commit 070aa50762
4 files changed
+13 -4

No files matched your search

+1 -1
View File
@@ -47,8 +47,8 @@ func (c *Cache) deleteProfile(data map[string]string) {
_, ok1 := c.Profiles[data["profile_name"]]
c.ProfilesMutex.Unlock()
if !ok1 {
fmt.Println("Profile deleted")
Database.Db.MustExec(Database.Db.Rebind("DELETE FROM urt_profiles WHERE name=?"), data["profile_name"])
fmt.Println("Profile deleted")
} else {
fmt.Println("Something goes wrong! Profile is still here!")
}