-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into release_to_dev
- Loading branch information
Showing
39 changed files
with
1,713 additions
and
428 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"flutterSdkVersion": "3.10.6", | ||
"flutterSdkVersion": "3.13.0", | ||
"flavors": {} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
functions/src/development/disableUserAccount/onCreateDisableUserAccountRequest.ts
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,19 @@ | ||
import * as admin from 'firebase-admin' | ||
import * as functions from 'firebase-functions' | ||
|
||
/** | ||
* 新しい disableUserAccountRequest ドキュメントが作成されたときに発火する。 | ||
* disableUserAccountRequest を作成したユーザーを disable にする。 | ||
*/ | ||
export const onCreateDisableUserAccountRequest = functions | ||
.region(`asia-northeast1`) | ||
.firestore.document(`/disableUserAccountRequests/{disableUserAccountRequest}`) | ||
.onCreate(async (snapshot) => { | ||
const disableUserAccountRequest = snapshot.data() | ||
const userId = disableUserAccountRequest.userId | ||
try { | ||
await admin.auth().updateUser(userId, { disabled: true }); | ||
} catch (e) { | ||
functions.logger.error(`退会処理に失敗しました。${e}`) | ||
} | ||
}) |
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
1 change: 1 addition & 0 deletions
1
packages/firebase_common/lib/src/firestore_documents/_export.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
20 changes: 20 additions & 0 deletions
20
packages/firebase_common/lib/src/firestore_documents/disable_user_account_request.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,20 @@ | ||
import 'package:cloud_firestore/cloud_firestore.dart'; | ||
import 'package:flutterfire_gen_annotation/flutterfire_gen_annotation.dart'; | ||
|
||
part 'disable_user_account_request.flutterfire_gen.dart'; | ||
|
||
@FirestoreDocument( | ||
path: 'disableUserAccountRequests', | ||
documentName: 'disableUserAccountRequest', | ||
) | ||
class DisableUserAccountRequest { | ||
const DisableUserAccountRequest({ | ||
required this.userId, | ||
this.createdAt, | ||
}); | ||
|
||
final String userId; | ||
|
||
@AlwaysUseFieldValueServerTimestampWhenCreating() | ||
final DateTime? createdAt; | ||
} |
Oops, something went wrong.