add rewards panels and change styles
This commit is contained in:
parent
ffa79454a0
commit
bc97bcfc3f
8 changed files with 163 additions and 76 deletions
|
|
@ -39,4 +39,18 @@ export async function makeCronReq(username: string, credentials: string){
|
|||
}
|
||||
})
|
||||
return(response)
|
||||
}
|
||||
}
|
||||
|
||||
export async function costReward(username: string, credentials: string, taskID: string, direction: string) {
|
||||
const url = "https://habitica.com/api/v4/tasks/".concat(taskID).concat("/score/").concat(direction)
|
||||
const response = fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"x-client": "278e719e-5f9c-43b1-9dba-8b73343dc062-HabiticaSync",
|
||||
"x-api-user": username,
|
||||
"x-api-key": credentials,
|
||||
}
|
||||
})
|
||||
return(response)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue