mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
feat: enable enterprise users to specify a custom logo (#5566)
* feat: enable enterprise users to specify a custom logo This adds a field in deployment settings that allows users to specify the URL to a custom logo that will display in the dashboard. This also groups service banner into a new appearance settings page. It adds a Fieldset component to allow for modular fields moving forward. * Fix tests
This commit is contained in:
23
codersdk/branding.go
Normal file
23
codersdk/branding.go
Normal file
@ -0,0 +1,23 @@
|
||||
package codersdk
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type UpdateBrandingRequest struct {
|
||||
LogoURL string `json:"logo_url"`
|
||||
}
|
||||
|
||||
// UpdateBranding applies customization settings available to Enterprise customers.
|
||||
func (c *Client) UpdateBranding(ctx context.Context, req UpdateBrandingRequest) error {
|
||||
res, err := c.Request(ctx, http.MethodPut, "/api/v2/branding", req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer res.Body.Close()
|
||||
if res.StatusCode != http.StatusOK {
|
||||
return readBodyAsError(res)
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user