bounswe / 2021SpringGroup5

4 stars 4 forks source link

Apply event feature on event page #688

Closed umutgun17 closed 2 years ago

umutgun17 commented 2 years ago

I will add apply button on event detail page to apply events.

umutgun17 commented 2 years ago

I added the button on event detail page

umutgun17 commented 2 years ago

when the click the button, redirect to another page and it request POST to backend.

The post code is below

export function applyEvent(me, event_id) {
  return httpClient.post(`/post/apply_to_event/`, {
    '@context': 'https://www.w3.org/ns/activitystreams',
    summary: `${me.name} rejected an application`,
    type: 'Application',
    object: {
      type: 'EventPost',
      Id: event_id,
    },
  });
}