[🐛] 8차 푸시 확인 #13
|
@ -31,20 +31,24 @@ public class PushController : ControllerBase
|
||||||
[CustomOperation("푸시전송", "저장된 양식으로, 사용자에게 푸시를 전송한다.", "푸시")]
|
[CustomOperation("푸시전송", "저장된 양식으로, 사용자에게 푸시를 전송한다.", "푸시")]
|
||||||
public async Task<IActionResult> SendPush(string deviceToken, string title, string body, int badge)
|
public async Task<IActionResult> SendPush(string deviceToken, string title, string body, int badge)
|
||||||
{
|
{
|
||||||
var keysFilePath = "/volume1/AcaMate/PROJECT/Application/Back/private/appleKeys.json";
|
var keysFilePath = "/src/private/appleKeys.json";
|
||||||
var uri = "";
|
var uri = "";
|
||||||
var p12FilePath = "";
|
var p12FilePath = "";
|
||||||
|
|
||||||
if (_env.IsDevelopment())
|
if (_env.IsDevelopment())
|
||||||
{
|
{
|
||||||
|
// TEST
|
||||||
|
Console.WriteLine($"Current Directory: {Environment.CurrentDirectory}");
|
||||||
|
Console.WriteLine($"Keys File Path: /src/private/appleKeys.json");
|
||||||
|
|
||||||
uri = "https://api.sandbox.push.apple.com";
|
uri = "https://api.sandbox.push.apple.com";
|
||||||
p12FilePath = "/volume1/AcaMate/PROJECT/Application/Back/private/AM_Push_Sandbox.p12";
|
p12FilePath = "/src/private/AM_Push_Sandbox.p12";
|
||||||
// p12FilePath = "private/AM_Push_Sandbox.p12";
|
// p12FilePath = "private/AM_Push_Sandbox.p12";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uri = "https://api.push.apple.com";
|
uri = "https://api.push.apple.com";
|
||||||
p12FilePath = "/volume1/AcaMate/PROJECT/Application/Back/private/AM_Push.p12";
|
p12FilePath = "/src/private/AM_Push.p12";
|
||||||
// p12FilePath = "private/AM_Push.p12";
|
// p12FilePath = "private/AM_Push.p12";
|
||||||
}
|
}
|
||||||
var apnsTopic = "me.myds.ipstien.acamate.AcaMate";
|
var apnsTopic = "me.myds.ipstien.acamate.AcaMate";
|
||||||
|
|
|
@ -17,7 +17,10 @@ public class PushServiceWithP12
|
||||||
public PushServiceWithP12(string keysFilePath, string p12Path, string apnsTopic)
|
public PushServiceWithP12(string keysFilePath, string p12Path, string apnsTopic)
|
||||||
{
|
{
|
||||||
var keys = JsonSerializer.Deserialize<Dictionary<string, string>>(File.ReadAllText(keysFilePath));
|
var keys = JsonSerializer.Deserialize<Dictionary<string, string>>(File.ReadAllText(keysFilePath));
|
||||||
this.p12Password = keys["Password"];
|
// TEST
|
||||||
|
Console.WriteLine($"File Exists: {keys}");
|
||||||
|
|
||||||
|
p12Password = keys["Password"];
|
||||||
this.p12Path = p12Path;
|
this.p12Path = p12Path;
|
||||||
this.apnsTopic = apnsTopic;
|
this.apnsTopic = apnsTopic;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user