Skip to content

Commit

Permalink
Merge branch 'url-share' of github.com:Program-AR/pilas-bloques-react…
Browse files Browse the repository at this point in the history
… into url-share
  • Loading branch information
tfloxolodeiro committed Dec 5, 2023
2 parents cb37b93 + ddaeaf3 commit ec92fd8
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.sharedId}`, challenge)
return await _send<SerializedChallenge>('PUT', `userChallenge/${challenge.sharedId}`, challenge)
}

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

0 comments on commit ec92fd8

Please sign in to comment.