Skip to content

Add remove devices impl#155

Merged
akpdw merged 6 commits intomainfrom
add-remove-devices-impl
Feb 17, 2026
Merged

Add remove devices impl#155
akpdw merged 6 commits intomainfrom
add-remove-devices-impl

Conversation

@akpdw
Copy link
Collaborator

@akpdw akpdw commented Feb 6, 2026

Fixes #54

@akpdw akpdw requested a review from deborahgu February 6, 2026 06:29
return bose_devices


def get_device_by_id(device_id: str) -> upnpclient.upnp.Device:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you just pass in the no-device ID case, this should return an Optional.

"/marge/streaming/account/{account}/device/",
response_class=BoseXMLResponse,
tags=["marge"],
status_code=201,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
status_code=201,
status_code=HTTPStatus.CREATED,

Comment on lines +323 to +326
response.headers["Credentials"] = f"{request.headers.get('authorization')}"
response.headers["location"] = (
f"{settings.base_url}/marge/account/{account}/device/{device_id}"
)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
response.headers["Credentials"] = f"{request.headers.get('authorization')}"
response.headers["location"] = (
f"{settings.base_url}/marge/account/{account}/device/{device_id}"
)

you thought this was unecessary?

f"{settings.base_url}/marge/account/{account}/device/{device}"
)
response.body = ""
response.status_code = 200
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
response.status_code = 200
response.status_code = HTTPStatus.CREATED

Copy link
Owner

@deborahgu deborahgu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved but minor changes requested.

@akpdw akpdw merged commit 2f944d2 into main Feb 17, 2026
@akpdw akpdw deleted the add-remove-devices-impl branch February 17, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: remove from/attach device to account

2 participants