Remove tmpFiles folder usage

This commit is contained in:
Yang Luo
2023-08-24 21:52:30 +08:00
parent 1eeeb64a0c
commit 8073dfa88c
10 changed files with 24 additions and 73 deletions

View File

@ -33,8 +33,8 @@ func getPermissionMap(owner string) (map[string]*Permission, error) {
return m, err
}
func UploadPermissions(owner string, fileId string) (bool, error) {
table := xlsx.ReadXlsxFile(fileId)
func UploadPermissions(owner string, path string) (bool, error) {
table := xlsx.ReadXlsxFile(path)
oldUserMap, err := getPermissionMap(owner)
if err != nil {

View File

@ -33,8 +33,8 @@ func getRoleMap(owner string) (map[string]*Role, error) {
return m, nil
}
func UploadRoles(owner string, fileId string) (bool, error) {
table := xlsx.ReadXlsxFile(fileId)
func UploadRoles(owner string, path string) (bool, error) {
table := xlsx.ReadXlsxFile(path)
oldUserMap, err := getRoleMap(owner)
if err != nil {

View File

@ -73,8 +73,8 @@ func parseListItem(lines *[]string, i int) []string {
return trimmedItems
}
func UploadUsers(owner string, fileId string) (bool, error) {
table := xlsx.ReadXlsxFile(fileId)
func UploadUsers(owner string, path string) (bool, error) {
table := xlsx.ReadXlsxFile(path)
oldUserMap, err := getUserMap(owner)
if err != nil {