24 lines
606 B
C#
24 lines
606 B
C#
using API.Authentication.Interfaces;
|
|
using API.DTO.Base;
|
|
using DAL.Contexts;
|
|
using DAL.Models;
|
|
using DAL.Models.Audits;
|
|
|
|
namespace API.Services
|
|
{
|
|
public class EventService : ServiceBase<EventService, EventDTO, Event, AuditEvent, IEventAuthentication>
|
|
{
|
|
public EventService(ILogger<EventService> logger, SASGContext context, IEventAuthentication auth) : base(logger, context, auth)
|
|
{
|
|
}
|
|
|
|
public bool? isSignedUp(User user, ulong eventId)
|
|
{
|
|
if (!_auth.canCheckSelfSignup(user))
|
|
return null;
|
|
|
|
return Context.Set<Signup>().Any(x => x.userId == user.id && x.eventId == eventId);
|
|
}
|
|
}
|
|
}
|