Skip to content
Browse files

[#15] ID 중복체크 API

  • Loading branch information...
JoMingyu committed Mar 7, 2019
1 parent e47898d commit 75127b187f4ba85c4422a8514a1ef16b16b3340c
@@ -9,3 +9,7 @@ class TblUsers(Base):
id = Column(String(64), primary_key=True)
password = Column(CHAR(93)) # len(
nickname = Column(String(32))

def is_id_already_signed(cls, session, id):
return cls.get_first_without_none_check(session, == id) is not None

This file was deleted.

Oops, something went wrong.
File renamed without changes.
@@ -0,0 +1,19 @@
from flask import abort

from app.extensions import main_db
from app.models.user import TblUsers
from app.views.base import BaseResource

class IDDuplicateCheckAPI(BaseResource):
def get(self, id):
ID 중복체크 API

session = main_db.session

if TblUsers.is_id_already_signed(session, id):
return {}, 200

0 comments on commit 75127b1

Please sign in to comment.
You can’t perform that action at this time.