Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AssassinRobot committed Sep 3, 2024
1 parent abc2259 commit 1b78e5c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions internal/service/user/user_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package user
import "errors"

var (
ErrNotFound = errors.New("user not found")
ErrUpdateUser = errors.New("failed to update user")
ErrDeleteUser = errors.New("failed to delete user")
ErrPlacePicture = errors.New("failed to place picture")
ErrNotFound = errors.New("user not found")
ErrUpdateUser = errors.New("failed to update user")
ErrDeleteUser = errors.New("failed to delete user")
ErrPlacePicture = errors.New("failed to place picture")
ErrUpdatePicture = errors.New("failed to update picture")
)
2 changes: 1 addition & 1 deletion internal/service/user/user_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (s *UserManager) UpdateProfilePicture(ctx context.Context, userID model.Use
if len(validationErrors) > 0 {
return &vali.Varror{ValidationErrors: validationErrors}
}

err := s.fileManager.SetFile(filename, filepath.Join(config.ProjectRootPath, uploadDir, userID))
if err != nil {
return &vali.Varror{Error: ErrPlacePicture}
Expand Down
3 changes: 1 addition & 2 deletions internal/service/user/user_vali.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ type UpdateProfileValidation struct {
}

type UpdateProfilePictureValidation struct {
UserID string `validate:"required"`
UserID string `validate:"required"`
FileName string `validate:"required"`
}

8 changes: 4 additions & 4 deletions protobuf/user/v1/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ package protobuf.user.v1;
option go_package = "protobuf/user/v1";

service UserService {
rpc UploadProfile(stream UploadProfileRequest)returns(UploadProfileResponse){}
rpc UploadProfile(stream UploadProfileRequest) returns (UploadProfileResponse) {}
}

message UploadProfileRequest{
bytes bytes = 1;
message UploadProfileRequest {
bytes bytes = 1;
}

message UploadProfileResponse{}
message UploadProfileResponse {}

0 comments on commit 1b78e5c

Please sign in to comment.