Giter VIP home page Giter VIP logo

tinder-backend's Introduction

Backend Pets Tinder

url: https://pets-tinder.herokuapp.com

Signup

POST: /api/user/signup
BODY: {
  "username": "abcxyz",
  "password": "123456",
  "full_name": "abcxyz",
  "confirmPassword": "123456",
  "address": "abcxyz",
  "lat": "10.823099",
  "lng": "106.629662"
}

Login

POST: /api/user/login
BODY: {
  "username": "abcxyz",
  "password": "123456",
  "lat": "10.823099",
  "lng": "106.629662"
}

Get profile

GET: /api/user
HEADER: {
  Authorization: "Bearer ${token}"
}

Update Profile

PUT: /api/user/update
HEADER: {
  Authorization: "Bearer ${token}"
}
BODY: {
  "email": "[email protected]",
  "phone": "0906366223",
  "area": 10,
  "gender": 0 | 1,
  "bio": "Hút thuốc khi buồn",
  "address": "ở đâu còn lâu mới nói",
  "hobbies": ["id"]
}

Change Password

POST: /api/user/change-password
HEADER: {
  Authorization: "Bearer ${token}"
}
BODY: {
  "old_password": "123456",
  "new_password": "1234567",
  "confirm_password": "1234567",
}

Upload Avatar

POST: /api/user/upload-avatar
HEADER: {
  Authorization: "Bearer ${token}"
}
BODY - FormData: {
  avatar: File
}

Upload Photos

POST: /api/user/upload-photos
HEADER: {
  Authorization: "Bearer ${token}"
}
BODY - FormData: {
  photos: Array[Files]
}

Delete Photo

POST: /api/user/delete-photo
HEADER: {
  Authorization: "Bearer ${token}"
}
BODY: {
  "photo": "abcxyz"
}

Swipe Matching

SOCKET: socket.emit("like-user", {
  token: "abcxyz",
  userId: "abcxyz"
})

Swipe Matching Response

SOCKET: socket.on("like-user-response", (data) => {})

Get All Messages

GET: /api/chat?userId=abcxyz
HEADER: {
  Authorization: "Bearer ${token}"
}

Join

SOCKET: socket.emit("join", {
  token: "abcxyz",
  userIds: ["abcxyz"],
})

Chat

SOCKET: socket.emit("send-message", {
  token: "abcxyz",
  userId: "abcxyz",
  message: "abcxyz
})

Swipe Matching Response

SOCKET: socket.on("send-message-response", (data) => {})

Get All Hobbies

GET: /api/hobby
HEADER: {
  Authorization: "Bearer ${token}"
}

Update Coordinates

POST: /api/user/update-coordinates
HEADER: {
  Authorization: "Bearer ${token}"
}
BODY: {
  "lat": "10.823099",
  "lng": "106.629662"
}

Get Can Matching List

GET: /api/user/can-matching-list
HEADER: {
  Authorization: "Bearer ${token}"
}

tinder-backend's People

Contributors

dvbtrung2302 avatar

Watchers

James Cloos 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.