- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 546 for Users (0.03 sec)
-
docs_src/bigger_applications/app_an/routers/users.py
from fastapi import APIRouter router = APIRouter() @router.get("/users/", tags=["users"]) async def read_users(): return [{"username": "Rick"}, {"username": "Morty"}] @router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 407 bytes - Viewed (0) -
docs_src/bigger_applications/app_an_py39/routers/users.py
from fastapi import APIRouter router = APIRouter() @router.get("/users/", tags=["users"]) async def read_users(): return [{"username": "Rick"}, {"username": "Morty"}] @router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 407 bytes - Viewed (0) -
cmd/admin-handlers-users.go
if s3Err != ErrNone { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(s3Err), r.URL) return } users := r.Form["users"] isAll := r.Form.Get("all") == "true" selfOnly := !isAll && len(users) == 0 if isAll && len(users) > 0 { // This should be checked on client side, so return generic error writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 03 23:11:02 UTC 2024 - 85.1K bytes - Viewed (0) -
cmd/admin-handlers-users-race_test.go
if err != nil { return err } c.mustNotListObjects(ctx, uClient, bucket) return nil } }(i), i) } if errs := g.Wait(); len(errs) > 0 { c.Fatalf("unable to remove users: %v", errs) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 28 09:06:25 UTC 2024 - 4K bytes - Viewed (0) -
tests/associations_many2many_test.go
if err := DB.Model(&users).Association("Languages").Delete(users[0].Languages[0], users[1].Languages[1]); err != nil { t.Errorf("no error should happened when deleting language, but got %v", err) } AssertAssociationCount(t, users, "Languages", 2, "after delete") // Clear DB.Model(&users).Association("Languages").Clear()
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Jun 10 13:05:19 UTC 2023 - 13.2K bytes - Viewed (0) -
tests/update_test.go
AssertEqual(t, lastUpdatedAt.UnixNano(), users[1].UpdatedAt.UnixNano()) // user2 should not be updated var user1, user2 User DB.First(&user1, users[0].ID) DB.First(&user2, users[1].ID) CheckUser(t, user1, *users[0]) CheckUser(t, user2, *users[1]) DB.Model(users[1]).UpdateColumn("name", "update_column_02_newnew").UpdateColumn("age", 19) AssertEqual(t, lastUpdatedAt.UnixNano(), users[1].UpdatedAt.UnixNano())
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0) -
tests/delete_test.go
if res := DB.Delete(&users[1]); res.Error != nil || res.RowsAffected != 1 { t.Errorf("errors happened when delete: %v, affected: %v", res.Error, res.RowsAffected) } var result User if err := DB.Where("id = ?", users[1].ID).First(&result).Error; err == nil || !errors.Is(err, gorm.ErrRecordNotFound) { t.Errorf("should returns record not found error, but got %v", err) } for _, user := range []User{users[0], users[2]} { result = User{}
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K bytes - Viewed (0) -
tests/test_infer_param_optionality.py
app.include_router(user_router, prefix="/users") app.include_router(item_router, prefix="/items") app.include_router(item_router, prefix="/users/{user_id}/items") client = TestClient(app) def test_get_users(): """Check that /users returns expected data""" response = client.get("/users") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 13.3K bytes - Viewed (0) -
tests/test_tutorial/test_testing_dependencies/test_tutorial001_an.py
def test_override_in_users(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == { "message": "Hello Users!", "params": {"q": None, "skip": 5, "limit": 10}, } def test_override_in_users_with_q(): response = client.get("/users/?q=foo") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
tests/query_test.go
} func TestOrWithAllFields(t *testing.T) { dryDB := DB.Session(&gorm.Session{DryRun: true, QueryFields: true}) userQuery := "SELECT .*users.*id.*users.*created_at.*users.*updated_at.*users.*deleted_at.*users.*name" + ".*users.*age.*users.*birthday.*users.*company_id.*users.*manager_id.*users.*active.* FROM .*users.* " result := dryDB.Where("role = ?", "admin").Or("role = ?", "super_admin").Find(&User{})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0)