添加用户缓存及更新,添加配置文件增删改查接口,添加文件功能.添加配置文件添加请求

This commit is contained in:
junleea 2025-01-03 16:11:16 +08:00
parent 5f98ed5651
commit e1ae537386
1 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,10 @@ func CreateConfigFile(req *proto.AddConfigFileReq, userId int) error {
err = fmt.Errorf("user not found or no permission")
return err
}
if req.FileName == "" || req.FilePath == "" {
err = fmt.Errorf("file name or file path is empty")
return err
}
//查看系统中是否存在文件,不存在则创建
file := req.FilePath + "/" + req.FileName
//正则判断文件名是否合法