UserController
UserController responsible for handling user related requests
Value parameters
- userUseCase
-
UserUseCase to interact with the database
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
addVideo adds a video to the user's list of videos
addVideo adds a video to the user's list of videos
Value parameters
-
email of the user
- videoId
-
id of the video
Attributes
- Returns
-
Future[Either[Exception, String]] Right if successful, Left otherwise
createUser adds a user to the database
createUser adds a user to the database
Value parameters
- user
-
user to be added
Attributes
- Returns
-
Future[Either[Exception, String]] Right if successful, Left otherwise
getUser fetches a user by email
getUser fetches a user by email
Value parameters
-
email of the user
Attributes
- Returns
-
Future[Option[User]] user if found, None otherwise
updateUser updates a user in the database
updateUser updates a user in the database
Value parameters
- user
-
user to be updated
Attributes
- Returns
-
Future[Either[Exception, String]] Right if successful, Left otherwise