RealDevSquad / RealDevSquad/website-backend

Feature Request : PATCH request that updates the authorization_status field of an existing qr-code-auth document for the specified user.

Open
#942 2 comments 0 reactions 1 assignee View on GitHub

@fakhruddinkw is already working on this.

Since Jun 19, 2023.

backend beginner friendly feature task good first issue
Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

Create a PATCH API call that will verify whether the specified user has scanned the QR or not by sending the device_id in the body and updating the authorization_status in the document.

Request
PATCH

Endpoint
/auth/qr-code-auth/authorization_status/{authorization_status}

Params
Authorization_status (required, string): Specifies the authorization status of the user. The possible values are "NOT_INIT" , "AUTHORIZED", and "REJECTED". The default value will be "NOT_INIT"

Cookie
rds-session: JWT

Request Body

 {
  "authorization_status": "AUTHORIZED"
}

Request Response

{
  "message": "String",
  "data": {
    "user_id": "String",
    "device_info": "String",
    "authorization_status": "String",
  }
}

In case of any doubt let's have a discussion on a call or you can text Mobile-App-React-Native channel on discord.
You can also check our API contract in case of error responses.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.