BuildForSDGCohort2 / Team-258-group-a-frontend

1 stars 2 forks source link

Edit a single bureau details. #105

Open leanny01 opened 3 years ago

leanny01 commented 3 years ago

The API endpoint to take in data with the following format

 {
    id: "123",
    logoImg:defaultImg,
    name: "Bureau_1",
    type: "bureau_1_type",
    business_reg_no: "1234",
    date_joined: Date.now(),
    social_fb: "url",
    social_tweeter: "url",
    social_linkedin: "url",
    social_google: "url",
    website:'us_in_the_game.com',
    contact: {
      primary_email: "email_1@email.com",
      secondary_email: "email@email.com",
      phone_number_1: "1111 555 77777",
      phone_number_2: "555 5566 6665",
      contact_person: "person",
      contact_position: "position",
    }

And returns the updated data

 {
    id: "123",
    logoImg:defaultImg,
    name: "Bureau_1",
    type: "bureau_1_type",
    business_reg_no: "1234",
    date_joined: Date.now(),
    social_fb: "url",
    social_tweeter: "url",
    social_linkedin: "url",
    social_google: "url",
    website:'us_in_the_game.com',
    contact: {
      primary_email: "email_1@email.com",
      secondary_email: "email@email.com",
      phone_number_1: "1111 555 77777",
      phone_number_2: "555 5566 6665",
      contact_person: "person",
      contact_position: "position",
    }

A meaningful error (with error code) message to be returned in case something went wrong