File size: 498 Bytes
1473494
c51594b
1473494
 
 
 
 
 
4346b78
 
c51594b
 
 
c2f4f33
c51594b
4346b78
c51594b
 
 
c2f4f33
c51594b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from fastapi import FastAPI
import funciones

app = FastAPI()

@app.get("/")
def hello(): 

    return {"Status":"Deployed"}

@app.get("/getTokens/{userfile}")
def getTokens(userfile: str):
    tokens = funciones.getAccess(userfile)
    print("Tipo de resultado:", type(tokens))
    return tokens

@app.get("/debitTokens/{userfile}/{work}")
def debitTokens(userfile: str, work: str):
    tokens = funciones.debitTokens(userfile,work) 
    print("Tipo de resultado:", type(tokens))
    return tokens