refactor: refactor controller handler module and admin module

This commit is contained in:
RockYang
2023-06-19 07:06:59 +08:00
parent 831dd3e2e0
commit 90bce1d437
22 changed files with 436 additions and 300 deletions

View File

@@ -3,12 +3,16 @@ package core
import (
"bytes"
"chatplus/core/types"
logger2 "chatplus/logger"
"chatplus/utils"
"github.com/BurntSushi/toml"
"net/http"
"os"
"github.com/BurntSushi/toml"
)
var logger = logger2.GetLogger()
func NewDefaultConfig() *types.AppConfig {
return &types.AppConfig{
Listen: "0.0.0.0:5678",
@@ -17,7 +21,7 @@ func NewDefaultConfig() *types.AppConfig {
Session: types.Session{
SecretKey: utils.RandString(64),
Name: "CHAT_SESSION_ID",
Name: "CHAT_PLUS_SESSION",
Domain: "",
Path: "/",
MaxAge: 86400,