From a450ddf0b8ad2c63b01e7d6515a620cc40ed526c Mon Sep 17 00:00:00 2001 From: Yuuki Wesp Date: Sat, 3 Aug 2024 22:58:41 +0300 Subject: [PATCH] add logs --- src/logic/services/firebase/FirebaseUserService.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/logic/services/firebase/FirebaseUserService.cs b/src/logic/services/firebase/FirebaseUserService.cs index df77d6b..44de853 100644 --- a/src/logic/services/firebase/FirebaseUserService.cs +++ b/src/logic/services/firebase/FirebaseUserService.cs @@ -7,6 +7,7 @@ namespace core.services; using FirebaseAdmin.Auth; using Flurl.Http; using Google.Cloud.Firestore; +using Newtonsoft.Json; using searchs; public class FirebaseUserService( @@ -60,10 +61,14 @@ public async Task UserAllowedPublishWorkloads() var user = await operationBuilder.Collection("users") .Document(me.Uid) .GetSnapshotAsync(); - + logger.LogInformation($"[UserAllowedPublishWorkloads] snapshot exist : {user.Exists}"); if (!user.Exists) - return false; - var userData = user.ConvertTo(); + return false; + logger.LogInformation($"[UserAllowedPublishWorkloads] snapshot date : {user.CreateTime}"); + + var userData = user.ConvertTo(); + + logger.LogInformation($"[UserAllowedPublishWorkloads] userData: {JsonConvert.SerializeObject(userData)}"); return userData.IsAllowedPublishWorkloads; }