refactor: updated routes and handlers
This commit is contained in:
parent
947fbba854
commit
4d96010199
3 changed files with 33 additions and 18 deletions
|
|
@ -1,6 +1,8 @@
|
|||
package makeshift
|
||||
|
||||
import "git.towk2.me/towk/makeshift/pkg/storage"
|
||||
import (
|
||||
"git.towk2.me/towk/makeshift/pkg/storage"
|
||||
)
|
||||
|
||||
type ProfileMap map[string]*Profile
|
||||
type Profile struct {
|
||||
|
|
@ -30,3 +32,13 @@ type Hook struct {
|
|||
func (h *Hook) Run() error {
|
||||
return h.Plugin.Run(h.Data, h.Args)
|
||||
}
|
||||
|
||||
func PluginToMap(p Plugin) map[string]any {
|
||||
return map[string]any{
|
||||
"name": p.Name(),
|
||||
"version": p.Version(),
|
||||
"description": p.Description(),
|
||||
"metadata": p.Metadata(),
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue