Skip to content

Commit

Permalink
rm server_name from media_delete_by_date_or_size
Browse files Browse the repository at this point in the history
not necessary as part of API requests

related to using new endpoint for deletion by date/size, which doesn't
require the homeserver name anymore
  • Loading branch information
JacksonChen666 committed Mar 27, 2024
1 parent acdcd81 commit 4956242
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions synadm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,8 @@ def media_delete(self, server_name, media_id):
server_name=server_name, media_id=media_id
)

def media_delete_by_date_or_size(self, server_name, before_days, before,
_before_ts, _size_gt, delete_profiles):
def media_delete_by_date_or_size(self, before_days, before, _before_ts,
_size_gt, delete_profiles):
""" Delete local media by date and/or size FIXME and/or?
"""
if before_days:
Expand All @@ -1025,7 +1025,6 @@ def media_delete_by_date_or_size(self, server_name, before_days, before,
self.log.info("which is the date: %s",
self._datetime_from_timestamp(before_ts))
params = {
"server_name": server_name,
}
if before_ts is not None:
params.update({
Expand Down
2 changes: 1 addition & 1 deletion synadm/cli/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def media_delete_cmd(helper, media_id, before_days, before, before_ts,
media_deleted = helper.api.media_delete(server_name, media_id)
else:
media_deleted = helper.api.media_delete_by_date_or_size(
server_name, before_days, before, before_ts, size, delete_profiles
before_days, before, before_ts, size, delete_profiles
)

if media_deleted is None:
Expand Down

0 comments on commit 4956242

Please sign in to comment.