Skip to content

Commit f3df062

Browse files
committed
Fixed error when username was less than 4 characters long #268
1 parent 5f22cfe commit f3df062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/webserver/api/Api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
const lengthPublicId = 35
2020
const lengthApiKey = 30
21-
const minLengthUser = 4
21+
const minLengthUser = 2
2222

2323
// Process parses the request and executes the API call or returns an error message to the sender
2424
func Process(w http.ResponseWriter, r *http.Request) {
@@ -501,7 +501,7 @@ func apiDuplicateFile(w http.ResponseWriter, r requestParser, user models.User)
501501
request.UnlimitedTime,
502502
request.UnlimitedDownloads,
503503
false, // is not being used by storage.DuplicateFile
504-
0) // is not being used by storage.DuplicateFile
504+
0) // is not being used by storage.DuplicateFile
505505
newFile, err := storage.DuplicateFile(file, request.RequestedChanges, request.FileName, uploadRequest)
506506
if err != nil {
507507
sendError(w, http.StatusInternalServerError, err.Error())

0 commit comments

Comments
 (0)