Feat v0.2.5 ui polish dead code (#9)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #9.
This commit is contained in:
@@ -101,13 +101,13 @@ func (h *PackageHandler) EnablePackage(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"id": id, "enabled": true})
|
||||
}
|
||||
|
||||
// DisablePackage disables a package. Chat and Admin cannot be disabled.
|
||||
// DisablePackage disables a package. Admin cannot be disabled.
|
||||
// PUT /api/v1/admin/packages/:id/disable
|
||||
// PUT /api/v1/admin/surfaces/:id/disable (alias)
|
||||
func (h *PackageHandler) DisablePackage(c *gin.Context) {
|
||||
id := c.Param("id")
|
||||
|
||||
if id == "chat" || id == "admin" {
|
||||
if id == "admin" {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": id + " cannot be disabled"})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user