Kinda work dms

This commit is contained in:
Karmanyaah Malhotra
2021-04-27 22:49:01 -04:00
parent b35a6be635
commit 0ff534c2df
7 changed files with 155 additions and 106 deletions

View File

@@ -178,8 +178,8 @@ type UserPortal struct {
func (user *User) SetPortalKeys(newKeys []PortalKeyWithMeta) error {
tx := user.db.Begin()
ans := tx.Where("user_jid = ?", *user.jidPtr()).Delete(&UserPortal{})
print("make sure all are deletede")
ans := tx.Where("user_jid = ?", *user.jidPtr()).Delete(UserPortal{})
if ans.Error != nil {
_ = tx.Rollback()
return ans.Error