Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: organization branding #258

Merged
merged 26 commits into from
Jan 15, 2025
Merged

feat: organization branding #258

merged 26 commits into from
Jan 15, 2025

Conversation

pmig
Copy link
Member

@pmig pmig commented Jan 12, 2025

No description provided.

Signed-off-by: Philip Miglinci <pmig@glasskube.com>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
func OrganizationBrandingRouter(r chi.Router) {
r.Get("/", getOrganizationBranding)
r.With(requireUserRoleVendor).Group(func(r chi.Router) {
r.Post("/", createOrganizationBranding)
Copy link
Member

Choose a reason for hiding this comment

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

on another note, we could have simply done only one PUT request, because PUT means both create or update, and by reading the path variable (branding id) we could decide whether to do a database insert or update. Because the two endpoints are the same code except for the db call.

Copy link
Member

Choose a reason for hiding this comment

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

  • as long as a user can only be in one organization (which will of course change), there is no need for the branding ID in the path, it can only ever be the branding object of the current organization (which is in the token)

@christophenne christophenne requested a review from kosmoz January 14, 2025 13:20
christophenne and others added 6 commits January 15, 2025 07:37
Co-authored-by: Jakob Steiner <kosmoz@users.noreply.github.com>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
Signed-off-by: christophenne <christoph.enne@glasskube.eu>
@christophenne christophenne requested a review from kosmoz January 15, 2025 08:47
…randing.component.html

Co-authored-by: Jakob Steiner <kosmoz@users.noreply.github.com>
Copy link
Member Author

@pmig pmig left a comment

Choose a reason for hiding this comment

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

LGTM

pmig added 2 commits January 15, 2025 10:42
Signed-off-by: Philip Miglinci <pmig@glasskube.com>
Signed-off-by: Philip Miglinci <pmig@glasskube.com>
@pmig pmig requested a review from christophenne January 15, 2025 09:43
Signed-off-by: Philip Miglinci <pmig@glasskube.com>
@pmig pmig merged commit 489217f into main Jan 15, 2025
4 checks passed
@pmig pmig deleted the pmig/org-branding branch January 15, 2025 10:33
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