Skip to content

Commit

Permalink
Remove created_by line in activity path to avoid overriding original …
Browse files Browse the repository at this point in the history
…creator
  • Loading branch information
gdalcengio authored and micheal-w-wells committed Oct 20, 2023
1 parent eea781d commit 07d4f8a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/src/paths/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,8 @@ function updateActivity(): RequestHandler {

const data = { ...req.body, media_keys: req['media_keys'], user_role: req.authContext?.roles[0] };

const isAdmin = (req as any).authContext.roles.find(role => role.role_id === 18)
const isAdmin = (req as any).authContext.roles.find((role) => role.role_id === 18);
const sanitizedActivityData = new ActivityPostRequestBody(data);
sanitizedActivityData.created_by = req.authContext?.friendlyUsername;
sanitizedActivityData.created_by_with_guid = req.authContext?.preferredUsername;
sanitizedActivityData.updated_by = req.authContext?.friendlyUsername;
sanitizedActivityData.updated_by_with_guid = req.authContext?.preferredUsername;
Expand Down

0 comments on commit 07d4f8a

Please sign in to comment.