Coverage for src\zapy\api\v1\api_store.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.3.4, created at 2023-12-20 14:17 -0500

1import magicattr 

2 

3from zapy.store.context import Stores 

4from zapy.store.attr import build_attr_info, Attr 

5 

6from fastapi import APIRouter 

7 

8 

9api_store_v1 = APIRouter(tags=["v1"]) 

10 

11 

12@api_store_v1.get("/stores/{store_id}") 

13async def get_store(store_id: str) -> Attr: 

14 stores = Stores() 

15 attr = magicattr.get(stores, store_id) 

16 return build_attr_info(attr, store_id) 

17