Skip to content
This repository was archived by the owner on Dec 18, 2019. It is now read-only.
This repository was archived by the owner on Dec 18, 2019. It is now read-only.

API - POST Functionality #4

@KatjaRademacher

Description

@KatjaRademacher

The api should be able to handle the following get functions:

  • Add data to the Database

I have already setup the API base. The file that needs to be changed to enable this functionality is called PropertiesDAO.php in folder app/DB/DAO/.

I have already created the methods for the functionality:

insert($object) for adding property data

You will need to prepare the SQL query and see that it was added successfully to the database.

Input Data:
{ "house_type": "House", "latitude": 53.3463227, "longitude": -6.2603097, "grass_overgrown": true, "windows_blocked": false, "activity_found": true, "comment": "" }

Additionally you will have to check that the following fields exists (as they are mandatory) before adding to database:

  • House Type
  • Latitude
  • Longitude
  • Grass Overgrown
  • Windows Blocked
  • Activity found

This check needs to be done in app/models/PropertyModel.php in the function called createNewProperty($property)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions