MCPcopy
hub / github.com/livebud/bud / loadActionMethod

Method loadActionMethod

framework/controller/loader.go:240–251  ·  view source on GitHub ↗

Method is the HTTP method for this controller

(actionName string)

Source from the content-addressed store, hash-verified

238
239// Method is the HTTP method for this controller
240func (l *loader) loadActionMethod(actionName string) string {
241 switch actionName {
242 case "Create":
243 return methodPost
244 case "Update":
245 return methodPatch
246 case "Delete":
247 return methodDelete
248 default:
249 return methodGet
250 }
251}
252
253func (l *loader) loadView(controllerKey, actionKey, actionRoute string) *View {
254 viewDir := path.Join("view", controllerKey)

Callers 1

loadActionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected