mirror of
https://github.com/datarhei/core.git
synced 2025-10-16 13:00:37 +08:00
WIP enforcing policies on process level
This commit is contained in:
@@ -76,3 +76,12 @@ func DefaultQuery(c echo.Context, name, defValue string) string {
|
||||
|
||||
return param
|
||||
}
|
||||
|
||||
func DefaultContext(c echo.Context, name, defValue string) string {
|
||||
value, ok := c.Get(name).(string)
|
||||
if !ok {
|
||||
return defValue
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
|
Reference in New Issue
Block a user