Files
plane/monitor/cli/pkg/handlers/instance_handler.go
Nikhil 213fd167f6 [WEB-3030] feat: business plan changes (#2395)
* chore: add business plan changes

* chore: monitor updates for business plan

* chore: license verification

* chore: add validation for license cancellation

* chore: proration preview endpoint

* chore:  add exception handling

* fix: license updates

* chore: add last payment failed date and count

* fix: invoice plan

* add current price amount

* feat: new add seats UI

* update price

* proration preview logic

* fix: invoicing endpoint

* add manage seats button to pro and bussiness card

---------

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
2025-02-12 17:26:27 +05:30

34 lines
640 B
Go

package handlers
import (
"fmt"
prime_api "github.com/makeplane/plane-ee/monitor/lib/api"
)
type InstanceHandler struct {
api prime_api.IPrimeMonitorApi
}
func NewInstanceHandler(api prime_api.IPrimeMonitorApi) *InstanceHandler {
return &InstanceHandler{api: api}
}
func (h *InstanceHandler) Activate() error {
err := h.api.ActivateInstance()
if err != nil {
return fmt.Errorf("unable to activate instance: %s", err.Error)
}
return nil
}
func (h *InstanceHandler) Deactivate() error {
err := h.api.DeactivateInstance()
if err != nil {
return fmt.Errorf("unable to deactivate instance: %s", err.Error)
}
return nil
}