refactor: updated routes and handlers

This commit is contained in:
David Allen 2025-08-29 23:52:43 -06:00
parent 947fbba854
commit 4d96010199
Signed by: towk
GPG key ID: 0430CDBE22619155
3 changed files with 33 additions and 18 deletions

View file

@ -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(),
}
}