Created the structure for set device token API

This commit is contained in:
ashutosh.nehete 2025-08-12 14:09:16 +05:30
parent 56977e3702
commit b44fd6d49f
2 changed files with 13 additions and 6 deletions

View File

@ -0,0 +1,7 @@
namespace Marco.Pms.Model.Utilities
{
public class DeviceTokenDto
{
public required string FcmToken { get; set; }
}
}

View File

@ -919,12 +919,12 @@ namespace MarcoBMS.Services.Controllers
}
}
//[Authorize]
//[HttpPost("set/device-token")]
//public async Task<IActionResult> StoreDeviceToken([FromBody] DeviceTokenDto model)
//{
//}
[Authorize]
[HttpPost("set/device-token")]
public async Task<IActionResult> StoreDeviceToken([FromBody] DeviceTokenDto model)
{
return Ok(ApiResponse<object>.SuccessResponse(model));
}
private static string ComputeSha256Hash(string rawData)
{
using (SHA256 sha256 = SHA256.Create())