File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 11
11
app = FastAPI ()
12
12
13
13
14
- @app .get (' /health_check/' )
14
+ @app .get (" /health_check/" )
15
15
def health_check ():
16
16
return {"message" : "Healthy!" }
17
17
18
18
19
- @app .post (' /capture/' )
19
+ @app .post (" /capture/" )
20
20
def capture (image : Annotated [UploadFile , File ()]):
21
21
output_file = io .StringIO ()
22
22
process_image (image .file , output_file )
23
23
output_file .seek (0 )
24
24
return {
25
- ' sgf' : output_file .read (),
26
- ' image_filename' : image .filename ,
25
+ " sgf" : output_file .read (),
26
+ " image_filename" : image .filename ,
27
27
}
28
28
29
29
30
- @app .post (' /capture_async/' )
30
+ @app .post (" /capture_async/" )
31
31
def capture_async (
32
- image : Annotated [UploadFile , File ()],
33
- fcm_registration_token : Annotated [str , Form ()]
32
+ image : Annotated [UploadFile , File ()], fcm_registration_token : Annotated [str , Form ()]
34
33
):
35
34
filename = Path (image .filename )
36
35
output_path = settings .IMAGES_DIR / filename
You can’t perform that action at this time.
0 commit comments