feat: create email channel for user after binding email

This commit is contained in:
JustSong
2023-05-06 11:10:26 +08:00
parent e03ba3439d
commit 2587f1533b
3 changed files with 18 additions and 1 deletions
+7
View File
@@ -93,6 +93,13 @@ func AddChannel(c *gin.Context) {
})
return
}
if channel_.Name == "email" {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": "不能使用系统保留名称",
})
return
}
cleanChannel := model.Channel{
Type: channel_.Type,
UserId: c.GetInt("id"),