添加用户缓存及更新,添加配置文件增删改查接口,添加文件功能.添加配置文件添加请求
This commit is contained in:
parent
5f98ed5651
commit
e1ae537386
|
|
@ -82,6 +82,10 @@ func CreateConfigFile(req *proto.AddConfigFileReq, userId int) error {
|
||||||
err = fmt.Errorf("user not found or no permission")
|
err = fmt.Errorf("user not found or no permission")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if req.FileName == "" || req.FilePath == "" {
|
||||||
|
err = fmt.Errorf("file name or file path is empty")
|
||||||
|
return err
|
||||||
|
}
|
||||||
//查看系统中是否存在文件,不存在则创建
|
//查看系统中是否存在文件,不存在则创建
|
||||||
file := req.FilePath + "/" + req.FileName
|
file := req.FilePath + "/" + req.FileName
|
||||||
//正则判断文件名是否合法
|
//正则判断文件名是否合法
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue