UserUseCase
UserUseCase responsible for handling user related use cases
Value parameters
- userService
-
UserService to interact with the database
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
addUser adds a user to the database
addUser adds a user to the database
Value parameters
- user
-
user to be added
Attributes
- Returns
-
Future[Either[Exception, String]] Right if successful, Left otherwise
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
fetchUser fetches a user by email
fetchUser 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