Skip to content

Admin API

Heesun Kim edited this page Dec 10, 2019 · 2 revisions

Admin API

각 μš”μ²­μ— λŒ€ν•œ 성곡은 λ‹€μ–‘ν•˜μ§€λ§Œ, μš”μ²­μ— λŒ€ν•œ μ‹€νŒ¨λŠ” μ•„λž˜μ˜ ν˜•μ‹μœΌλ‘œ λͺ¨λ“  μš”μ²­μ— λ™μΌν•˜λ‹€.

  • RES: { result: false, message }

user

λͺ¨λ“  μœ μ € 쑰회

  • REQ: GET (/api)/admin/user/list
  • RES: { result, userList: [ { github_id, is_admin }, ... ] }

μœ μ € ν•œλͺ… 쑰회

  • REQ: GET (/api)/admin/user/:githubId
  • RES: { result, user: { github_id, is_admin } }

μœ μ € κΆŒν•œ μˆ˜μ •

  • REQ: PUT (/api)/admin/user
    • body: { githubId, action }
    • 이 λ•Œ, action은 authorize || deauthorize
  • RES: { result }

μœ μ € μ‚­μ œ

  • REQ: DELETE (/api)/admin/user
    • body: { githubId }
  • RES: { result }

nickname-noun

λͺ…사 전체 쑰회

  • REQ: GET (/api)/admin/nickname/noun/list
  • RES: { result, nounList }

λͺ…사 μΆ”κ°€

  • REQ: POST (/api)/admin/nickname/noun
    • body: { noun }
  • RES: { result }

λͺ…사 μˆ˜μ •

  • REQ: GET (/api)/admin/nickname/noun
    • body: { id, noun }
  • RES: { result }

λͺ…사 μ‚­μ œ

  • REQ: GET (/api)/admin/nickname/noun
    • body: { id }
  • RES: { result }

nickname-adj

ν˜•μš©μ‚¬ 전체 쑰회

  • REQ: GET (/api)/admin/nickname/adj/list
  • RES: { result, adjList }

ν˜•μš©μ‚¬ μΆ”κ°€

  • REQ: POST (/api)/admin/nickname/adj
    • body: { adj }
  • RES: { result }

ν˜•μš©μ‚¬ μˆ˜μ •

  • REQ: GET (/api)/admin/nickname/adj
    • body: { id, adj }
  • RES: { result }

ν˜•μš©μ‚¬ μ‚­μ œ

  • REQ: GET (/api)/admin/nickname/adj
    • body: { id }
  • RES: { result }

quiz

ν€΄μ¦ˆ 전체 쑰회

  • REQ: GET (/api)/admin/quiz/list
  • RES: { result, quizList }

ν€΄μ¦ˆ μΆ”κ°€

  • REQ: POST (/api)/admin/quiz
    • body: { category, level, question, comment, answer }
  • RES: { result }

ν€΄μ¦ˆ μˆ˜μ •

  • REQ: GET (/api)/admin/quiz
    • body: { id, action, value }
    • μ—¬κΈ°μ„œ action: category || level || question || comment || answer
    • μ—¬κΈ°μ„œ value: 각 action에 ν•΄λ‹Ήν•˜λŠ” μƒˆλ‘œμš΄ κ°’
  • RES: { result }

ν€΄μ¦ˆ μ‚­μ œ

  • REQ: GET (/api)/admin/quiz
    • body: { id }
  • RES: { result }

image

이미지 전체 쑰회

  • REQ: GET (/api)/admin/image/list
  • RES: { result, imageList }

이미지 μΆ”κ°€

  • REQ: POST (/api)/admin/image
    • body: { category, name, url }
  • RES: { result }

이미지 μˆ˜μ •

  • REQ: GET (/api)/admin/image
    • body: { id, action, value }
    • μ—¬κΈ°μ„œ action: category || name || url
    • μ—¬κΈ°μ„œ value: 각 action에 ν•΄λ‹Ήν•˜λŠ” μƒˆλ‘œμš΄ κ°’
  • RES: { result }

이미지 μ‚­μ œ

  • REQ: GET (/api)/admin/image
    • body: { id }
  • RES: { result }
Clone this wiki locally