You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the middle layer (often referred to as "middleware") between the backend and the frontend. It's job is to unify backend functions and data in a way that's natural and corresponds to the way the user interacts with the app. In other words, specific actions should be mapped to functions in the middleware, which interacts with the backend accordingly.
Goals:
ClubsModel
Defines actions any user can take
List<Club> getAllClubs() -- Gets all clubs from Firebase
List<Club> getUserClubs() -- Gets the clubs this user is registered to (see User.registeredClubs)
Future<void> registerForClub(Club club) -- registers for a club
Future<void> unregisterFromClub(Club club) -- unregisters from a club
Future<void> addPhoneNumber(String number) -- adds phoneNumber to User.contactInfo
ClubCaptainModel
Defines actions for club captains/faculty advisors. Takes a Club as parameter
Future<void> uploadClub(Club newClub) -- updates/creates a club in the database
Future<void> removeMember(String email) -- removes a user from the club
Future<void> postMessage(Message message) -- posts a message to all users
This is the middle layer (often referred to as "middleware") between the backend and the frontend. It's job is to unify backend functions and data in a way that's natural and corresponds to the way the user interacts with the app. In other words, specific actions should be mapped to functions in the middleware, which interacts with the backend accordingly.
Goals:
ClubsModel
Defines actions any user can take
List<Club> getAllClubs()
-- Gets all clubs from FirebaseList<Club> getUserClubs()
-- Gets the clubs this user is registered to (seeUser.registeredClubs
)Future<void> registerForClub(Club club)
-- registers for a clubFuture<void> unregisterFromClub(Club club)
-- unregisters from a clubFuture<void> addPhoneNumber(String number)
-- addsphoneNumber
toUser.contactInfo
ClubCaptainModel
Defines actions for club captains/faculty advisors. Takes a
Club
as parameterFuture<void> uploadClub(Club newClub)
-- updates/creates a club in the databaseFuture<void> removeMember(String email)
-- removes a user from the clubFuture<void> postMessage(Message message)
-- posts a message to all usersFuture<void> takeAttendance(List<String> members)
-- takes attendanceClubAdminModel
Defines actions for club administrators (like Dov)
Future<void> approveClub(Club club)
-- approves a club for viewing/joiningFuture<void> deleteClub(Club club)
-- deletes a club (will have confirmation in the UI)The text was updated successfully, but these errors were encountered: