Skip to content

Commit

Permalink
fix(activitylog): space -> folder
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <[email protected]>
  • Loading branch information
kobergj authored and dragonchaser committed Sep 19, 2024
1 parent 26df865 commit 5e72a0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ config = {
},
"e2eTests": {
"part": {
"skip": True, # TODO: reenable them as soon as the test is fixed in web
"skip": True, # TODO: reenable them as soon as the test is fixed in web
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
"xsuites": ["search", "app-provider", "oidc"], # suites to skip
},
Expand Down
13 changes: 2 additions & 11 deletions services/activitylog/pkg/service/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
// Translations
var (
MessageResourceCreated = l10n.Template("{user} added {resource} to {folder}")
MessageResourceUpdated = l10n.Template("{user} updated {resource} in {folder}")
MessageResourceTrashed = l10n.Template("{user} deleted {resource} from {folder}")
MessageResourceUpdated = l10n.Template("{user} updated {resource} in {space}")
MessageResourceMoved = l10n.Template("{user} moved {resource} to {folder}")
MessageResourceRenamed = l10n.Template("{user} renamed {oldResource} to {resource}")
MessageShareCreated = l10n.Template("{user} shared {resource} with {sharee}")
Expand Down Expand Up @@ -71,16 +71,6 @@ func WithResource(ref *provider.Reference, addSpace bool) ActivityOption {
Name: info.GetName(),
}

parent, err := utils.GetResourceByID(ctx, info.GetParentId(), gwc)
if err != nil {
return err
}

vars["folder"] = Resource{
ID: info.GetParentId().GetOpaqueId(),
Name: parent.GetName(),
}

if addSpace {
vars["space"] = Resource{
ID: info.GetSpace().GetId().GetOpaqueId(),
Expand Down Expand Up @@ -228,6 +218,7 @@ func WithSpace(spaceid *provider.StorageSpaceId) ActivityOption {
}
}

// WithLinkFieldUpdated sets the field and token variables for an activity
func WithLinkFieldUpdated(e *events.LinkUpdated) ActivityOption {
return func(_ context.Context, _ gateway.GatewayAPIClient, vars map[string]interface{}) error {
f := "some field"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ Feature: check share activity
"required": ["message","variables"],
"properties": {
"message": {
"const": "{user} updated {resource} in {space}"
"const": "{user} updated {resource} in {folder}"
},
"variables": {
"type": "object",
Expand Down

0 comments on commit 5e72a0f

Please sign in to comment.