Skip to content

Commit

Permalink
renamed the backend bounty url to bounties, to accomodate the new bou…
Browse files Browse the repository at this point in the history
…nty url change
  • Loading branch information
elraphty committed Oct 5, 2023
1 parent a9bb1d7 commit 4ddfbcd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions frontend/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function App() {

const getBountyRoles = useCallback(async () => {
await mainStore.getRoles();
await mainStore.getPeopleBounties();
}, []);

useEffect(() => {
Expand Down
14 changes: 7 additions & 7 deletions frontend/app/src/store/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ export class MainStore {

// if we don't pass the params, we should use previous params for invalidate query
const query2 = this.appendQueryParams(
'bounty/all',
'bounties/all',
queryLimit,
params ? queryParams : this.getWantedsPrevParams
);
Expand Down Expand Up @@ -890,7 +890,7 @@ export class MainStore {

async getBountyById(id: number): Promise<PersonBounty[]> {
try {
const ps2 = await api.get(`bounty/id/${id}`);
const ps2 = await api.get(`bounties/id/${id}`);
const ps3: any[] = [];

if (ps2 && ps2.length) {
Expand Down Expand Up @@ -977,7 +977,7 @@ export class MainStore {

async getBountyCount(personKey: string, tabType: string): Promise<number> {
try {
const count = await api.get(`bounty/count/${personKey}/${tabType}`);
const count = await api.get(`bounties/count/${personKey}/${tabType}`);

return count;
} catch (e) {
Expand Down Expand Up @@ -1327,7 +1327,7 @@ export class MainStore {
}

try {
const request = `bounty/${owner_pubkey}/${created}`;
const request = `bounties/${owner_pubkey}/${created}`;
//TODO: add some sort of authentication
const response = await fetch(`${TribesURL}/${request}`, {
method: 'DELETE',
Expand Down Expand Up @@ -1619,7 +1619,7 @@ export class MainStore {
try {
if (!uiStore.meInfo) return null;
const info = uiStore.meInfo;
const r: any = await fetch(`${TribesURL}/bounty/assignee`, {
const r: any = await fetch(`${TribesURL}/bounties/assignee`, {
method: 'DELETE',
mode: 'cors',
body: JSON.stringify({
Expand Down Expand Up @@ -1842,7 +1842,7 @@ export class MainStore {
try {
if (!uiStore.meInfo) return null;
const info = uiStore.meInfo;
const r: any = await fetch(`${TribesURL}/bounty/paymentstatus/${created}`, {
const r: any = await fetch(`${TribesURL}/bounties/paymentstatus/${created}`, {
method: 'POST',
mode: 'cors',
headers: {
Expand Down Expand Up @@ -1888,7 +1888,7 @@ export class MainStore {
if (!uiStore.meInfo) return null;
const info = uiStore.meInfo;

const r: any = await fetch(`${TribesURL}/bounty/pay/${body.id}`, {
const r: any = await fetch(`${TribesURL}/bounties/pay/${body.id}`, {
method: 'POST',
mode: 'cors',
body: JSON.stringify(body),
Expand Down
2 changes: 1 addition & 1 deletion routes/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewRouter() *http.Server {
r.Mount("/person", PersonRoutes())
r.Mount("/connectioncodes", ConnectionCodesRoutes())
r.Mount("/github_issue", GithubIssuesRoutes())
r.Mount("/bounty", BountyRoutes())
r.Mount("/bounties", BountyRoutes())
r.Mount("/organizations", OrganizationRoutes())

r.Group(func(r chi.Router) {
Expand Down

0 comments on commit 4ddfbcd

Please sign in to comment.