Skip to content

Commit

Permalink
Simplify data opts handling in matrix raw cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
JOJ0 committed Oct 2, 2023
1 parent d87098b commit 05dd99b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions synadm/cli/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,10 @@ def raw_request_cmd(helper, endpoint, method, data, data_file, token, prompt):
token = click.prompt("Matrix token", type=str)

if data_file:
raw_request = helper.matrix_api.raw_request(
endpoint,
method,
data_file.read(),
token=token
)
else:
raw_request = helper.matrix_api.raw_request(endpoint, method, data,
token=token)
data = data_file.read()

raw_request = helper.matrix_api.raw_request(endpoint, method, data,
token=token)

if helper.no_confirm:
if raw_request is None:
Expand Down

0 comments on commit 05dd99b

Please sign in to comment.