-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c55c3b
commit f288cb3
Showing
4 changed files
with
37 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
.../settings/src/subpages/my_profile/change_type_of_user/change_type_of_user_repository.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import 'package:cloud_functions/cloud_functions.dart'; | ||
import 'package:user/user.dart'; | ||
|
||
class ChangeTypeOfUserRepository { | ||
final FirebaseFunctions _functions; | ||
|
||
const ChangeTypeOfUserRepository({ | ||
required FirebaseFunctions functions, | ||
}) : _functions = functions; | ||
|
||
Future<void> changeTypeOfUser(TypeOfUser typeOfUser) async { | ||
final callable = _functions.httpsCallable('changeTypeOfUser'); | ||
await callable.call({ | ||
'type': typeOfUser.name, | ||
}); | ||
} | ||
} |