lnbits / raisenow

Raise funds for multiple participants
Other
1 stars 0 forks source link

Facing issue with /api/v1/participant/{participant_id} #6

Closed DoktorShift closed 1 month ago

DoktorShift commented 1 month ago

I am not able to fetch the data within this request. Whats the correct syntax?

curl -X GET "https://your-url/raisenow/api/v1/participant/{participant_id}" -H "X-Api-Key: API-Key"

I tryed with invoice key first and also admin key. It´s not working.

--> {"detail":"name 'participant_id' is not defined"}

I tryed to get some information inside the codebase which is not the case for me.

## Get a single record

@raisenow_ext.get("/api/v1/participant/{participant_id}", status_code=HTTPStatus.OK)
async def api_participant(
    req: Request, raisenow_id: str, WalletTypeInfo=Depends(get_key_type)
):
    participant = await get_participant(participant_id, req)
    if not participant:
        raise HTTPException(
            status_code=HTTPStatus.NOT_FOUND, detail="participant does not exist."
        )
    return participant.dict()

Can someone please point me to the correct syntax.

System: Lnbits 0.12.9 Rainbow: 0.0.5