mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
add require read file by name
This commit is contained in:
@@ -56,7 +56,7 @@ func (e *File) Read(ctx context.Context, req *file.ReadRequest, rsp *file.ReadRe
|
||||
|
||||
// filter the file
|
||||
for _, file := range files {
|
||||
if file.Path == req.Path {
|
||||
if file.Path == req.Path && file.Name == req.Name {
|
||||
// strip the tenant id
|
||||
file.Id = strings.TrimPrefix(file.Id, tenantId+"/")
|
||||
file.Project = strings.TrimPrefix(file.Project, tenantId+"/")
|
||||
|
||||
Reference in New Issue
Block a user