refactoring
This commit is contained in:
@ -10,6 +10,7 @@ using Microsoft.AspNet.Identity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Google.Messaging;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Models.Haircut;
|
||||
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
@ -27,11 +28,11 @@ namespace Yavsc.Services
|
||||
/// <returns>a MessageWithPayloadResponse,
|
||||
/// <c>bool somethingsent = (response.failure == 0 && response.success > 0)</c>
|
||||
/// </returns>
|
||||
public async Task<MessageWithPayloadResponse> NotifyBookQueryAsync(GoogleAuthSettings googleSettings, IEnumerable<string> registrationIds, BookQueryEvent ev)
|
||||
public async Task<MessageWithPayloadResponse> NotifyBookQueryAsync(GoogleAuthSettings googleSettings, IEnumerable<string> registrationIds, RdvQueryEvent ev)
|
||||
{
|
||||
MessageWithPayloadResponse response = null;
|
||||
await Task.Run(()=>{
|
||||
response = googleSettings.NotifyEvent<BookQueryEvent>(registrationIds, ev);
|
||||
response = googleSettings.NotifyEvent<RdvQueryEvent>(registrationIds, ev);
|
||||
});
|
||||
return response;
|
||||
}
|
||||
@ -45,6 +46,16 @@ namespace Yavsc.Services
|
||||
return response;
|
||||
}
|
||||
|
||||
public async Task<MessageWithPayloadResponse> NotifyHairCutQueryAsync(GoogleAuthSettings googleSettings,
|
||||
IEnumerable<string> registrationIds, HairCutQueryEvent ev)
|
||||
{
|
||||
MessageWithPayloadResponse response = null;
|
||||
await Task.Run(()=>{
|
||||
response = googleSettings.NotifyEvent<HairCutQueryEvent>(registrationIds, ev);
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
public Task<bool> SendEmailAsync(SiteSettings siteSettings, SmtpSettings smtpSettings, string email, string subject, string message)
|
||||
{
|
||||
try
|
||||
|
Reference in New Issue
Block a user