1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-07-16 18:54:22 +02:00

fixed formatting and typos

This commit is contained in:
Gani Georgiev
2023-02-23 21:51:42 +02:00
parent aa4e405f92
commit 21b152b58c
14 changed files with 45 additions and 50 deletions

View File

@ -429,7 +429,6 @@ func (form *RecordUpsert) LoadData(requestData map[string]any) error {
if len(submittedNames) == 0 && len(oldNames) > 0 {
form.RemoveFiles(key)
} else if len(oldNames) > 0 {
toDelete := []string{}
for _, name := range oldNames {
@ -763,18 +762,6 @@ func (form *RecordUpsert) Submit(interceptors ...InterceptorFunc[*models.Record]
}, interceptors...)
}
func (form *RecordUpsert) getFilesToUploadNames() []string {
names := []string{}
for fieldKey := range form.filesToUpload {
for _, file := range form.filesToUpload[fieldKey] {
names = append(names, file.Name)
}
}
return names
}
func (form *RecordUpsert) processFilesToUpload() error {
if len(form.filesToUpload) == 0 {
return nil // no parsed file fields