diff --git a/rules/notebook.go b/rules/notebook.go index a145c8b..939e5be 100644 --- a/rules/notebook.go +++ b/rules/notebook.go @@ -75,8 +75,11 @@ func (nr *NotebookRule) Generate(params map[string]interface{}) (string, []byte, // @Param body body NotebookRuleInput true "Input data to generate hostname" // @Success 200 {object} models.SimpleHostnameResponse "Hostname" // @Router /api/notebook [post] -func (nr *NotebookRule) Insert(category string, hostname string, paramsJSON []byte) error { - return nr.baseInsert(category, hostname, paramsJSON) +// @Security Bearer +func (nr *NotebookRule) Insert(category string, params map[string]interface{}) (string, error) { + // Generate the hostname + + return nr.baseInsert(nr, category, params) } // @Summary Update hostname for category "notebook" @@ -84,10 +87,11 @@ func (nr *NotebookRule) Insert(category string, hostname string, paramsJSON []by // @ID update-notebook-hostname // @Accept json // @Produce json -// @Tags Generating Hostnames +// @Tags Manipulate existing Hostnames // @Param body body NotebookRuleInput true "Input data to generate hostname" // @Success 200 {object} models.SimpleHostnameResponse "Hostname" // @Router /api/notebook [put] -func (nr *NotebookRule) Update(category string, oldhostname string, hostname string, paramsJSON []byte) error { - return nr.baseUpdate(category, oldhostname, hostname, paramsJSON) +// @Security Bearer +func (nr *NotebookRule) Update(category string, oldhostname string, params map[string]interface{}) (string, error) { + return nr.baseUpdate(nr, category, oldhostname, params) }