Esempio n. 1
0
    def addMember(self, memberData):
        del memberData['confirm']

        memberDB = db()
        memberDB.insertMember(memberData)

        return
Esempio n. 2
0
    def login(self, admin):
        adminId = admin['adminId']
        password = admin['password']
        adminDB = db()
        checkValidAdmin = adminDB.findAdmin({"adminId": adminId})

        try:
            if checkValidAdmin['password'] == password:
                return True
            else:
                return False
        except:
            return False
Esempio n. 3
0
 def loginMember(self, memberData):
     id = memberData['id']
     print(type(id))
     pwd = memberData['password']
     print(memberData)
     memberDB = db()
     dbData = memberDB.findMember({"id": id})
     try:
         if dbData['password'] == pwd:
             return True
         else:
             return False
     except:
         return False
Esempio n. 4
0
 def deleteUser(self, userId):
     adminDB = db()
     return adminDB.deleteMember(userId)
Esempio n. 5
0
 def getUserList(self):
     adminDB = db()
     return adminDB.findAllMember()
Esempio n. 6
0
    def writeBoard(self, boardData):
        boardDB = db()
        boardDB.insertBoard(boardData)

        return
Esempio n. 7
0
    def viewBoardContent(self, sno):
        boardDB = db()
        contents = boardDB.findBoardContent({"sno": int(sno)})

        return contents
Esempio n. 8
0
    def viewBoardList(self):
        boardDB = db()
        boardList = boardDB.findBoardTitle()

        return boardList