|
|
@@ -123,7 +123,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.Error,
|
|
|
- "An error was happened",
|
|
|
+ Lang.errorOccurred,
|
|
|
new { }
|
|
|
);
|
|
|
}
|
|
|
@@ -204,7 +204,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -236,7 +236,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.Error,
|
|
|
- "User info is not existed.",
|
|
|
+ Lang.accountNotExisted,
|
|
|
new
|
|
|
{
|
|
|
}
|
|
|
@@ -261,7 +261,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.SUCCESS,
|
|
|
- "Success",
|
|
|
+ Lang.success,
|
|
|
new { packages = query, totalPage = o }
|
|
|
);
|
|
|
}
|
|
|
@@ -273,7 +273,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.Error,
|
|
|
- "An error was happened",
|
|
|
+ Lang.errorOccurred,
|
|
|
new { }
|
|
|
);
|
|
|
}
|
|
|
@@ -354,7 +354,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.SUCCESS,
|
|
|
- "Success",
|
|
|
+ Lang.success,
|
|
|
new
|
|
|
{
|
|
|
accountUser = userAccounts,
|
|
|
@@ -370,7 +370,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
{
|
|
|
log.Error("Exception: ", exception);
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
@@ -485,7 +485,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -584,7 +584,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -681,7 +681,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -770,7 +770,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -886,7 +886,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -1010,7 +1010,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
public async Task<IActionResult> UserOtpConfirm(
|
|
|
@@ -1110,7 +1110,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.SUCCESS,
|
|
|
- "Success",
|
|
|
+ Lang.success,
|
|
|
new
|
|
|
{
|
|
|
accountUser = userAccounts,
|
|
|
@@ -1124,7 +1124,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -1159,7 +1159,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
|
|
|
if (verifySubscription && string.IsNullOrWhiteSpace(myIdToken))
|
|
|
{
|
|
|
- return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, "Missing MyID access token", new { });
|
|
|
+ return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.missingMyIdAccessToken, new { });
|
|
|
}
|
|
|
|
|
|
if (verifySubscription)
|
|
|
@@ -1167,7 +1167,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
var verified = await VerifyMyIdSubscriptionAsync(msisdn, myIdToken!);
|
|
|
if (!verified)
|
|
|
{
|
|
|
- return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, "MyID authentication failed", new { });
|
|
|
+ return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.myIdAuthenticationFailed, new { });
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1220,7 +1220,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.SUCCESS,
|
|
|
- "Success",
|
|
|
+ Lang.success,
|
|
|
new
|
|
|
{
|
|
|
accountUser = account,
|
|
|
@@ -1233,7 +1233,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("MyIdAutoLogin Exception: ", exception);
|
|
|
}
|
|
|
|
|
|
- return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, "An error was happened", new { });
|
|
|
+ return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.errorOccurred, new { });
|
|
|
}
|
|
|
|
|
|
private async Task<bool> VerifyMyIdSubscriptionAsync(string msisdn, string myIdToken)
|
|
|
@@ -1303,7 +1303,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.Error,
|
|
|
- "Msisdn is invalid",
|
|
|
+ Lang.msisdnInvalid,
|
|
|
new { }
|
|
|
);
|
|
|
}
|
|
|
@@ -1352,7 +1352,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
url,
|
|
|
json,
|
|
|
CommonErrorCode.SUCCESS,
|
|
|
- "Success",
|
|
|
+ Lang.success,
|
|
|
new
|
|
|
{
|
|
|
accountUser = userAccounts[0],
|
|
|
@@ -1366,7 +1366,7 @@ namespace Kitty_Fall.Apis.Business.User
|
|
|
log.Error("Exception: ", exception);
|
|
|
}
|
|
|
return await Task.FromResult<IActionResult>(
|
|
|
- new BadRequestObjectResult(new { message = "Bad request" })
|
|
|
+ new BadRequestObjectResult(new { message = Lang.badRequest })
|
|
|
);
|
|
|
}
|
|
|
private static object GetHttpSendRequest()
|