mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-19 12:34:05 +02:00
[#114] simplified some code by returning early and added cap for slices
This commit is contained in:
1 parent
03a7bafa66
commit
a16b0c9004
11 files changed
+124
-147
No files matched your search
+1
-1
@@ -48,7 +48,7 @@ func (scenario *ApiScenario) Test(t *testing.T) {
|
||||
recorder := httptest.NewRecorder()
|
||||
req := httptest.NewRequest(scenario.Method, scenario.Url, scenario.Body)
|
||||
|
||||
// add middeware to timeout long running requests (eg. keep-alive routes)
|
||||
// add middleware to timeout long-running requests (eg. keep-alive routes)
|
||||
e.Pre(func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
ctx, cancelFunc := context.WithTimeout(c.Request().Context(), 100*time.Millisecond)
|
||||
|
||||
Reference in new issue
Block a user