Moibe commited on
Commit
88c4a76
·
1 Parent(s): c2f4f33

Add path and query parameters

Browse files
Files changed (1) hide show
  1. main.py +13 -1
main.py CHANGED
@@ -4,7 +4,7 @@ import funciones
4
  app = FastAPI()
5
 
6
  @app.get("/")
7
- def hello():
8
 
9
  return {"Status":"Deployed"}
10
 
@@ -14,8 +14,20 @@ def getTokens(userfile: str):
14
  print("Tipo de resultado:", type(tokens))
15
  return tokens
16
 
 
 
 
 
 
 
17
  @app.get("/debitTokens/{userfile}/{work}")
18
  def debitTokens(userfile: str, work: str):
 
 
 
 
 
 
19
  tokens = funciones.debitTokens(userfile,work)
20
  print("Tipo de resultado:", type(tokens))
21
  return tokens
 
4
  app = FastAPI()
5
 
6
  @app.get("/")
7
+ def start():
8
 
9
  return {"Status":"Deployed"}
10
 
 
14
  print("Tipo de resultado:", type(tokens))
15
  return tokens
16
 
17
+ @app.get("/getTokensQ/")
18
+ def getTokens(userfile: str = "gAAAAABmEZA4SLBC2YczouOrjIEi9WNCNGOIvyUcqBUnzxNsftXTdy54KaX9x8mAjFkABSI6FJrdZDQKk_5lpJOgJoMChxlniw=="):
19
+ tokens = funciones.getAccess(userfile)
20
+ print("Tipo de resultado:", type(tokens))
21
+ return tokens
22
+
23
  @app.get("/debitTokens/{userfile}/{work}")
24
  def debitTokens(userfile: str, work: str):
25
+ tokens = funciones.debitTokens(userfile,work)
26
+ print("Tipo de resultado:", type(tokens))
27
+ return tokens
28
+
29
+ @app.get("/debitTokensQ/")
30
+ def debitTokens(userfile: str, work: str = "picswap"):
31
  tokens = funciones.debitTokens(userfile,work)
32
  print("Tipo de resultado:", type(tokens))
33
  return tokens