Fix #65 missing based url from sign up
Add Support for CircleMember History in GetChoresHistory
This commit is contained in:
parent
d4c36e2057
commit
d98f4b599f
1 changed files with 8 additions and 2 deletions
|
@ -11,7 +11,8 @@ const createChore = userID => {
|
|||
}
|
||||
|
||||
const signUp = (username, password, displayName, email) => {
|
||||
return fetch(`/auth/`, {
|
||||
const baseURL = apiManager.getApiURL()
|
||||
return fetch(`${baseURL}/auth/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
@ -420,11 +421,16 @@ const RefreshToken = () => {
|
|||
headers: HEADERS(),
|
||||
})
|
||||
}
|
||||
const GetChoresHistory = async limit => {
|
||||
const GetChoresHistory = async (limit, includeMembers) => {
|
||||
var url = `/chores/history`
|
||||
if (!limit) limit = 7
|
||||
|
||||
if (limit) {
|
||||
url += `?limit=${limit}`
|
||||
}
|
||||
if (includeMembers) {
|
||||
url += `&members=true`
|
||||
}
|
||||
const resp = await Fetch(url, {
|
||||
method: 'GET',
|
||||
headers: HEADERS(),
|
||||
|
|
Loading…
Add table
Reference in a new issue