aboutsummaryrefslogtreecommitdiff
path: root/pkg/service/main_test.go
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-04 18:38:10 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-04 18:40:02 +0200
commit311ab744fe1bf278b18c25892497271988399e9a (patch)
tree89f956f521000ac0d22f815e91cab4cf00a8b70f /pkg/service/main_test.go
parentc2d666b43477ea7042b574ad940c508216cb0e83 (diff)
downloadlens-311ab744fe1bf278b18c25892497271988399e9a.tar.gz
lens-311ab744fe1bf278b18c25892497271988399e9a.tar.bz2
lens-311ab744fe1bf278b18c25892497271988399e9a.zip
feat: Add user based files
Now files follow user path configuration
Diffstat (limited to 'pkg/service/main_test.go')
-rw-r--r--pkg/service/main_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/service/main_test.go b/pkg/service/main_test.go
index 5c10ecd..e1214dc 100644
--- a/pkg/service/main_test.go
+++ b/pkg/service/main_test.go
@@ -119,3 +119,11 @@ func (u *UserRepository) furtherID() uint {
u.icount++
return u.icount
}
+
+func (u *UserRepository) GetPathFromUserID(ctx context.Context, id uint) (string, error) {
+ if user, ok := u.users[id]; ok {
+ return user.Path, nil
+ }
+
+ return "", errors.New("Not Found")
+}