bounswe / 2021SpringGroup5

4 stars 4 forks source link

Iplementing equipmant detail page #687

Closed umutgun17 closed 2 years ago

umutgun17 commented 2 years ago

I will design equipment detail page. I will connect it with backend

umutgun17 commented 2 years ago

I designed the page with post name, sport category, post description, equipment link with HTML bootstrap.

umutgun17 commented 2 years ago

I integrated the page with backend via POST request.

The related code is below

export function getEquipment(me, eq_id) {

  return httpClient
    .post(`/post/get_equipment_post_details/`, {
      '@context': 'https://www.w3.org/ns/activitystreams',
      summary: `${me.name} is reading an event post.`,
      type: 'View',

      actor: {
        type: 'Person',
        name: `${me.name}`,
        surname: `${me.surname}`,
        username: `${me.username}`,
        Id: Number.parseInt(me.Id),
      },

      object: {
        type: 'EquipmetPost',
        post_id: Number.parseInt(eq_id),
      },

    })
    .then(res => res.data);

}