Skip to content

Tool booking#449

Open
maffe03 wants to merge 4 commits intomainfrom
tool-booking
Open

Tool booking#449
maffe03 wants to merge 4 commits intomainfrom
tool-booking

Conversation

@maffe03
Copy link
Member

@maffe03 maffe03 commented Dec 8, 2025

No description provided.

@maffe03 maffe03 requested a review from georgelgeback March 1, 2026 15:56
Copy link
Contributor

@georgelgeback georgelgeback left a comment

Choose a reason for hiding this comment

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

We need to think more about the required permissions to add bookings, maybe we should add another tool_booking_request model for regular members? Everything else looks great though, smart solution for checking if there are too many booked tools in a range.

class ToolBookingRead(BaseSchema):
id: int
tool: SimpleToolRead
amount: int
Copy link
Contributor

Choose a reason for hiding this comment

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

Amount is in SimpleToolRead too. Do we need both?

return tool


@tool_router.get("/", response_model=list[ToolRead], dependencies=[Permission.require("view", "Tools")])
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be member perms, not admin. As far as I can see no sensitive data is in ToolRead.

return db.query(Tool_DB).all()


@tool_router.get("/{tool_id}", response_model=ToolRead, dependencies=[Permission.require("view", "Tools")])
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

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.

3 participants