Giter Club home page Giter Club logo

go-test's Introduction

 _   _______  _____ ___________ ___________ 
| | | | ___ \/  ___|     |  _  \  ___| ___ \
| | | | |_/ /\ `--.|     | | | | |__ | |_/ /
| | | |  __/  `--. \     | | | |  __||    / 
| |_| | |    /\__/ /     | |/ /| |___| |\ \ 
 \___/\_|    \____/|_____|___/ \____/\_| \_|

Hi there! Welcome to UPSIDER's Coding Challenge!

Coding Test Instructions

Introduction

For this coding test, you will need to create a new endpoint called "PUT /users" to update an existing record. In addition, you will need to add a credential mechanism, authorization, and create a model of "UserHistory" which records the previous values if the user data is being modified.

Requirements

Your solution should:

Task 1: Create Update Endpoint

  • Create a new endpoint called "PUT /users" that accepts PUT requests to update an existing record.
  • Return a 200 response with a json of the updated object if the update is successful.
  • Return a 404 response if the object is not found.
  • Return a 400 response if there is a problem with the json format.

Task 2: Authorization

  • Add a credential/authorization mechanism. If the request has the "X-Update-Key" header with the value "{update_key}" that matches with the record, then it should pass, otherwise, it should return a 403 response.

Task 3: Create History Record upon Update

  • Create a model of "UserHistory" which records the previous values if the user data is being modified.
  • Modify the behavior of the PUT request so it records the previous version of the record.

Happy coding!

go-test's People

Watchers

Yusuke Izumi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.