For code format
This commit is contained in:
parent
e1475260f3
commit
227362f8e9
1 changed files with 44 additions and 40 deletions
|
|
@ -65,7 +65,7 @@ namespace Yavsc.Controllers
|
|||
.Include(x => x.PerformerProfile)
|
||||
.Include(x => x.PerformerProfile.Performer)
|
||||
.Include(x => x.Location)
|
||||
.Where(x=> x.ClientId == uid || x.PerformerId == uid)
|
||||
.Where(x => x.ClientId == uid || x.PerformerId == uid)
|
||||
.ToListAsync());
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,8 @@ namespace Yavsc.Controllers
|
|||
var existingLocation = _context.Locations.FirstOrDefault(x => x.Address == command.Location.Address
|
||||
&& x.Longitude == command.Location.Longitude && x.Latitude == command.Location.Latitude);
|
||||
|
||||
if (existingLocation!=null) {
|
||||
if (existingLocation != null)
|
||||
{
|
||||
command.Location = existingLocation;
|
||||
}
|
||||
else _context.Attach<Location>(command.Location);
|
||||
|
|
@ -170,14 +171,16 @@ namespace Yavsc.Controllers
|
|||
&& pro.AcceptPublicContact)
|
||||
{
|
||||
|
||||
try {
|
||||
if (pro.Performer.Devices.Count > 0) {
|
||||
try
|
||||
{
|
||||
_logger.LogInformation("sending GCM");
|
||||
if (pro.Performer.Devices.Count > 0)
|
||||
{
|
||||
var regids = command.PerformerProfile.Performer
|
||||
.Devices.Select(d => d.GCMRegistrationId);
|
||||
grep = await _GCMSender.NotifyBookQueryAsync(regids, yaev);
|
||||
}
|
||||
|
||||
_logger.LogError("sending GCM");
|
||||
|
||||
// TODO setup a profile choice to allow notifications
|
||||
// both on mailbox and mobile
|
||||
|
|
@ -189,7 +192,8 @@ namespace Yavsc.Controllers
|
|||
_logger.LogError(ex.Message);
|
||||
}
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
ViewBag.EmailSent = await _emailSender.SendEmailAsync(
|
||||
command.PerformerProfile.Performer.UserName,
|
||||
command.PerformerProfile.Performer.Email,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue