初步完成用户电子邮箱绑定(激活)

This commit is contained in:
刘祥超
2022-12-08 20:25:46 +08:00
parent 781c851571
commit 1ab849d9b0
23 changed files with 302 additions and 161 deletions

View File

@@ -2,7 +2,10 @@
package tasks
import "github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
import (
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
)
type BaseTask struct {
}
@@ -10,3 +13,7 @@ type BaseTask struct {
func (this *BaseTask) logErr(taskType string, errString string) {
remotelogs.Error("TASK", "run '"+taskType+"' failed: "+errString)
}
func (this *BaseTask) IsPrimaryNode() bool {
return models.SharedAPINodeDAO.CheckAPINodeIsPrimaryWithoutErr()
}