Skip to content

DonBaDa/DonBaDa_Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DonBaDa_Server

host: "soylatte.kr" port: 2233

User Schema

_id: String
id: String
fb_token: String // 페이스북 토큰
name: String // 이름
birth: String // 생일
phone: String // 전화번호
picture: String // 사진(페이스북)
debt_rooms: [Room] // 채무자 룸 (나에게 돈을 줘야하는 사람)
credit_rooms: [Room] // 채권자 룸 (내가 돈을 줘야하는 사람)

Room Schema

creditor: User, //채권자 (돈을 받아야하는 사람)
debtor: User, //채무자 (돈을 갚아야하는 사람)
D_day: String, //디데이
amount: String, //돈 양
title: String, //제목
isEnd: Boolean //돈을 갚았냐 안갚았냐

Query

[GET] /users/?id={id}

유저 정보 가져오기

params -

  • id: user id

return - 200

  • User Schema

return - 400

  • user not found
[GET] /users/fb

페이스북에서 정보가져오기

params -

  • token: facebook access token

return - 200

  • id: facebook id
  • name: facebook name
  • birth: facebook birthday
  • picture: facebook picture url
  • email: facebook email

return - 400

  • user exist
[POST] /users/reg

회원가입

body -

  • id: user id
  • name: facebook name
  • birth: facebook birthday
  • email: facebook email
  • phone: phone number

return -

  • User Schema
[POST] /users/card

카드등록

body -

  • id: user id
  • card_number: card number DDDD-DDDD-DDDD-DDDD
  • expiry: 유효기간 YYYY-DD
  • birth: 생년월일 YYMMDD
  • pw: 비밃번호 DD

return - 200

  • User Schema

return - 400

  • Error
[GET] /room/?id={id}

룸 정보 찾기

params -

  • id: room _id

return - 200

  • User Schema

return - 400

  • user not found
[POST] /room/

룸 생성

params -

  • creditor: creditor user id
  • debtor: debtor user id
  • title: title
  • D_day: D-day
  • amount: money amount

return - 200

  • Room Schema

return - 400

  • user not found or room not found
[POST] /pay

결제

body -

  • id: Room _id

return - 200

  • okay
[POST] /facebook

페이스북 페널티

body -

  • id: Room _id
  • message: 게시글 content

return - 200

  • okay

return - 500

  • error
[POST] /gps

GPS 페널티

body -

  • id: Room _id

return - 200

  • okay

return - 400

  • room not found
[POST] /lock

Lock 페널티

body -

  • id: Room _id

return - 200

  • okay

return - 400

  • room not found
[POST] /sound

Sound 페널티

body -

  • id: Room _id

return - 200

  • okay

return - 400

  • room not found
[POST] /flash

Flash 페널티

body -

  • id: Room _id

return - 200

  • okay

return - 400

  • room not found

Socket

host: "soylatte.kr" port: 3344

[WRITE]

'{"id": "${user-id}", "type": "set"} 유저정보 저장

[ON]

'gps' GPS 페널티
'lock' Lock 페널티
'sound' sound 페널티
'flash' flash 페널티

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published