24 lines
606 B
C#
Raw Normal View History

using API.Authentication.Interfaces;
using API.DTO.Base;
using DAL.Contexts;
using DAL.Models;
using DAL.Models.Audits;
namespace API.Services
{
2024-07-12 23:12:04 -05:00
public class EventService : ServiceBase<EventService, EventDTO, Event, AuditEvent, IEventAuthentication>
{
2024-07-12 23:12:04 -05:00
public EventService(ILogger<EventService> logger, SASGContext context, IEventAuthentication auth) : base(logger, context, auth)
{
}
2024-08-31 18:38:43 -05:00
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);
}
}
}