// // Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License. // using Astral.Core.Entities; using Astral.Core.Infrastructure; using Astral.Core.RepositoryInterfaces; using Dapper; using Injectio.Attributes; namespace Astral.DAL.Repositories; /// [RegisterScoped] public class RefreshTokenRepository : BaseRepository, IRefreshTokenRepository { /// /// Initializes a new instance of the class. /// /// Instance of . public RefreshTokenRepository(IDbConnectionProvider db) : base(db) { } /// public async Task RevokeAllForUser(Guid userId) { await WithDatabaseAsync(async connection => await connection.ExecuteAsync( $"DELETE FROM {Table} WHERE userId = @pUserId", new { pUserId = userId, })); } }