mirror of
https://git.vectorsigma.ru/public/CasaOS.git
synced 2026-07-29 00:37:38 +00:00
feat: migrate gin to echo (#1854)
This commit is contained in:
11
pkg/utils/default_post_form.go
Normal file
11
pkg/utils/default_post_form.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package utils
|
||||
|
||||
import "github.com/labstack/echo/v4"
|
||||
|
||||
func DefaultPostForm(ctx echo.Context, key, defaultValue string) string {
|
||||
value := ctx.Request().Form.Get(key)
|
||||
if value == "" {
|
||||
return defaultValue
|
||||
}
|
||||
return value
|
||||
}
|
||||
Reference in New Issue
Block a user