Skip to content

aldwiputra/taskify-api-2

Repository files navigation

Database REST API - Aldwiputra

REST API for Taskify built with Nest.

Installation

To install the application, follow these steps:

Clone the repository: git clone https://github.com/revou-fsse-1/w14-my-authorized-api-aldwiputra.git

Install the dependencies: pnpm install

Running the app

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod

Authentication Flow

Register

Register-Sequence-Diagram

Login

Login-Sequence-Diagram

API Endpoints

See a full documentation here API Documentation

This project exposes the following endpoints:

/auth

POST /auth/register

Register a new user.

Request Body:

  • username (string, required) - The username of the user.
  • password (string, required) - The password of the user.

POST /auth/login

Login a new user.

Request Body:

  • username (string, required) - The username of the user.
  • password (string, required) - The password of the user.

/users

GET /users/me

Get currently logged in user.


GET /users/ (Ignore this unimportant endpoint :()

Greet unauthenticated user.


/tasks

GET /tasks OR /tasks?q=play

Returns a list of all tasks.

Query:

  • q (string, optional) - The query string to filter the result.

GET /tasks/:id

Returns the details of a specific task.

Parameters:

  • id (string, required) - The ID of the task to retrieve.

POST /tasks

Creates a new task.

Request Body:

  • title (string, required) - The name of the user.
  • done (boolean, required) - Is the task has been done or not.
  • userId (number, required) - User id of the task's owner.

PUT /tasks/:id

Updates the details of a specific task.

Parameters:

  • id (string, required) - The ID of the user to update.

Request Body:

  • title (string, required) - The name of the user.
  • done (boolean, required) - Is the task has been done or not.

PATCH /tasks/:id

Updates the details of a specific task.

Parameters:

  • id (string, required) - The ID of the user to update.

Request Body:

  • done (boolean, required) - Is the task has been done or not.

DELETE /tasks/:id

Deletes a specific task.

parameters:

  • id (string, required) - the id of the user to delete.

Tech Stack

My Skills

About

Api for taskify

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published