principalement du format de code

This commit is contained in:
Paul Schneider 2020-09-12 01:11:30 +01:00
commit ff1444d664
87 changed files with 510 additions and 550 deletions

View file

@ -71,7 +71,6 @@ namespace Yavsc.Controllers
[Authorize(Roles = Constants.AdminGroupName)]
public IActionResult Index(string page, string len)
{
return View();
}
@ -262,7 +261,7 @@ namespace Yavsc.Controllers
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
// Send an email with this link
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: "https", host: Startup.Authority);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code }, protocol: "https", host: Startup.Authority);
var emailSent = await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
string.Format(_localizer["ConfirmYourAccountBody"], _siteSettings.Title, callbackUrl, _siteSettings.Slogan, _siteSettings.Audience));
// No, wait for more than a login pass submission:
@ -317,7 +316,7 @@ namespace Yavsc.Controllers
{
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action("ConfirmEmail", "Account",
new { userId = user.Id, code = code }, protocol: "https", host: Startup.Authority);
new { userId = user.Id, code }, protocol: "https", host: Startup.Authority);
var res = await _emailSender.SendEmailAsync(user.UserName, user.Email,
this._localizer["ConfirmYourAccountTitle"],
string.Format(this._localizer["ConfirmYourAccountBody"],

View file

@ -29,18 +29,18 @@ namespace Yavsc.Controllers
private readonly SignInManager<ApplicationUser> _signInManager;
private readonly IEmailSender _emailSender;
private readonly ILogger _logger;
private SiteSettings _siteSettings;
private readonly SiteSettings _siteSettings;
private ApplicationDbContext _dbContext;
private readonly ApplicationDbContext _dbContext;
private GoogleAuthSettings _googleSettings;
private readonly GoogleAuthSettings _googleSettings;
private PayPalSettings _payPalSettings;
private IYavscMessageSender _GCMSender;
private SIRENChecker _cchecker;
private IStringLocalizer _SR;
private CompanyInfoSettings _cinfoSettings;
ICalendarManager _calendarManager;
private readonly PayPalSettings _payPalSettings;
private readonly IYavscMessageSender _GCMSender;
private readonly SIRENChecker _cchecker;
private readonly IStringLocalizer _SR;
private readonly CompanyInfoSettings _cinfoSettings;
readonly ICalendarManager _calendarManager;
public ManageController(
@ -300,7 +300,7 @@ namespace Yavsc.Controllers
{
var uid = User.GetUserId();
var calendars = await _calendarManager.GetCalendarsAsync(uid, pageToken);
var calendars = await _calendarManager.GetCalendarsAsync(pageToken);
return View(new SetGoogleCalendarViewModel {
ReturnUrl = returnUrl,
Calendars = calendars

View file

@ -20,12 +20,10 @@ namespace Yavsc.Controllers
[AllowAnonymous]
public class OAuthController : Controller
{
ApplicationDbContext _context;
UserManager<ApplicationUser> _userManager;
SiteSettings _siteSettings;
ILogger _logger;
readonly ApplicationDbContext _context;
readonly UserManager<ApplicationUser> _userManager;
readonly SiteSettings _siteSettings;
readonly ILogger _logger;
private readonly SignInManager<ApplicationUser> _signInManager;
public OAuthController(ApplicationDbContext context, SignInManager<ApplicationUser> signInManager, IKeyManager keyManager,

View file

@ -10,7 +10,7 @@ namespace Yavsc.Controllers
[Authorize("AdministratorOnly")]
public class UsersController : Controller
{
private ApplicationDbContext _context;
private readonly ApplicationDbContext _context;
public UsersController(ApplicationDbContext context)
{