Firebase_Implementation #135
@ -1,5 +1,4 @@
|
|||||||
using System.Globalization;
|
using FirebaseAdmin.Messaging;
|
||||||
using FirebaseAdmin.Messaging;
|
|
||||||
using Marco.Pms.DataAccess.Data;
|
using Marco.Pms.DataAccess.Data;
|
||||||
using Marco.Pms.Model.AttendanceModule;
|
using Marco.Pms.Model.AttendanceModule;
|
||||||
using Marco.Pms.Model.Dtos.Attendance;
|
using Marco.Pms.Model.Dtos.Attendance;
|
||||||
@ -15,6 +14,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.CodeAnalysis;
|
using Microsoft.CodeAnalysis;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System.Globalization;
|
||||||
using Document = Marco.Pms.Model.DocumentManager.Document;
|
using Document = Marco.Pms.Model.DocumentManager.Document;
|
||||||
|
|
||||||
namespace MarcoBMS.Services.Controllers
|
namespace MarcoBMS.Services.Controllers
|
||||||
@ -808,7 +808,17 @@ namespace MarcoBMS.Services.Controllers
|
|||||||
PreSignedUrl = string.Empty
|
PreSignedUrl = string.Empty
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
var message = new Message()
|
||||||
|
{
|
||||||
|
Token = "ewjsd9zGTh6aS6Vg3Z_uxP:APA91bFZi1KzZdxlHUfBa_dX3PEJnDhX4R2dvFjD9Zf3WPSm957Hb53JPim7jrpjhpeOY61I9rfc11c3wpqWfW_06aSx-Yb8UfWpygV2YgZ8gbHtSku_PSQ",
|
||||||
|
Notification = new Notification
|
||||||
|
{
|
||||||
|
Title = "Hello from .NET",
|
||||||
|
Body = "This is a test message"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
string response = await FirebaseMessaging.DefaultInstance.SendAsync(message);
|
||||||
|
_logger.LogInfo("Firebase push notification messageId: {MessageId}", response);
|
||||||
|
|
||||||
|
|
||||||
_logger.LogInfo("Attendance for employee {FirstName} {LastName} has been marked", employee.FirstName ?? string.Empty, employee.LastName ?? string.Empty);
|
_logger.LogInfo("Attendance for employee {FirstName} {LastName} has been marked", employee.FirstName ?? string.Empty, employee.LastName ?? string.Empty);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user