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) => {
|
const signUp = (username, password, displayName, email) => {
|
||||||
return fetch(`/auth/`, {
|
const baseURL = apiManager.getApiURL()
|
||||||
|
return fetch(`${baseURL}/auth/`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
@ -420,11 +421,16 @@ const RefreshToken = () => {
|
||||||
headers: HEADERS(),
|
headers: HEADERS(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const GetChoresHistory = async limit => {
|
const GetChoresHistory = async (limit, includeMembers) => {
|
||||||
var url = `/chores/history`
|
var url = `/chores/history`
|
||||||
|
if (!limit) limit = 7
|
||||||
|
|
||||||
if (limit) {
|
if (limit) {
|
||||||
url += `?limit=${limit}`
|
url += `?limit=${limit}`
|
||||||
}
|
}
|
||||||
|
if (includeMembers) {
|
||||||
|
url += `&members=true`
|
||||||
|
}
|
||||||
const resp = await Fetch(url, {
|
const resp = await Fetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: HEADERS(),
|
headers: HEADERS(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue