feat: add midjouney api implements, optimize function calls

This commit is contained in:
RockYang
2023-08-11 18:46:56 +08:00
parent 0b27890484
commit 302cb8a5be
17 changed files with 298 additions and 183 deletions

View File

@@ -21,9 +21,9 @@ func NewRewardHandler(server *core.AppServer, db *gorm.DB) *RewardHandler {
return &h
}
func (h *RewardHandler) Push(c *gin.Context) {
token := c.GetHeader("X-TOKEN")
if token != h.App.Config.ChatPlusExtApiToken {
func (h *RewardHandler) Notify(c *gin.Context) {
token := c.GetHeader("Authorization")
if token != h.App.Config.ExtConfig.Token {
resp.NotAuth(c)
return
}