Skip to content

Commit

Permalink
changing user challenge resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dlopezalvas committed Dec 5, 2023
1 parent 3267552 commit ddaeaf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pbApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ export namespace PilasBloquesApi{
}

export const shareChallenge = async (challenge: SerializedChallenge) => {
return await _send<SerializedChallenge>('POST', 'share', challenge)
return await _send<SerializedChallenge>('POST', 'userChallenge', challenge)
}

export const getSharedChallenge = async (id: string) => {
return await _send('GET', `userChallenge/${id}`)
}

export const saveChallenge = async (challenge: SerializedChallenge) => {
return await _send<SerializedChallenge>('PUT', `share/${challenge.shareId}`, challenge)
return await _send<SerializedChallenge>('PUT', `userChallenge/${challenge.shareId}`, challenge)
}

export const baseURL = window.PBRuntime?.apiURL || process.env.REACT_APP_API_URL
Expand Down

0 comments on commit ddaeaf3

Please sign in to comment.