Logs
Patchsets
Range Diff ↕ rd-29
1: 3bd44da ! 1: 9002592 chore(pgs): add validation to project names
Range Diff ↕ rd-30
1: 9002592 = 1: 9002592 chore(pgs): add validation to project names
-: ------- > 2: cd17cf4 chore: update pobj
-: ------- > 3: a00def2 chore: complete impl
Range Diff ↕ rd-31
1: 9002592 = 1: 9002592 chore(pgs): add validation to project names
2: cd17cf4 = 2: cd17cf4 chore: update pobj
3: a00def2 = 3: a00def2 chore: complete impl
-: ------- > 4: 0ed7dc9 chore: update pobj
-: ------- > 5: 8ff1131 working!
Range Diff ↕ rd-32
1: 9002592 = 1: 9002592 chore(pgs): add validation to project names
2: cd17cf4 = 2: cd17cf4 chore: update pobj
3: a00def2 = 3: a00def2 chore: complete impl
4: 0ed7dc9 = 4: 0ed7dc9 chore: update pobj
5: 8ff1131 = 5: 8ff1131 working!
-: ------- > 6: 0c8ad0d chore(obj): prep service def
Range-diff rd-29
- title
- chore(pgs): add validation to project names
- description
-
Patch changed
- old #1
3bd44da
- new #1
9002592
1: 3bd44da ! 1: 9002592 chore(pgs): add validation to project names
shared/bucket.go
return fmt.Sprintf("static-%s", userID) } +func ValidateProjectName(projectName string) error { + if projectName == "pico-private" { + if projectName == "pico-private" || projectName == "pico-imgs" { + return fmt.Errorf("%s is an invalid project name", projectName) + } + return nil +} + func GetProjectName(entry *utils.FileEntry) string { if entry.Mode.IsDir() && strings.Count(entry.Filepath, string(os.PathSeparator)) == 0 { return entry.Filepath
shared/bucket.go
return fmt.Sprintf("static-%s", userID) } +func ValidateProjectName(projectName string) error { + if projectName == "pico-private" { + if projectName == "pico-private" || projectName == "pico-imgs" { + return fmt.Errorf("%s is an invalid project name", projectName) + } + return nil +} + func GetProjectName(entry *utils.FileEntry) string { if entry.Mode.IsDir() && strings.Count(entry.Filepath, string(os.PathSeparator)) == 0 { return entry.Filepath