Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
Create helper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Oct 5, 2019
1 parent ad99305 commit d094956
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions api/helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/path/to/interpreter

"""Helper Class"""


class Helper:
"""
Helper Class.
Contains helper methods for cars_app app
"""

@staticmethod
def check_auth(username, password, user_list):
"""
check if the given is valid
:param user_list:
:param username:
:param password:
:return:
"""

user = [user for user in user_list if user['name']
== username and user['password'] == password]
if len(user) == 1:
return True
return False

0 comments on commit d094956

Please sign in to comment.