using API_Access_Control.Models.Entities;
using Microsoft.EntityFrameworkCore;

namespace API_Access_Control.Services;

public class ApiService
{
    private readonly CloudJwtContext _context;

    public ApiService(CloudJwtContext context)
    {
        _context = context;
    }

    public bool Exists(int apiId, string apiSecret)
    {
        return _context.Apis.Any(a => a.ApiPk == apiId && a.ClefSecrete == apiSecret);
    }
}