private async Task <UserDto> GetUserWithApiKeysAsync(User user) { if (user == null) { return(null); } var apiKeys = await _database.ApiKeys().GetAllForUserAsync(user.Id); return(new UserDto(user) { ApiKeys = apiKeys.Select(x => x.Key) }); }
public async Task <Maybe <ApiKeyDto> > GetAsync(string key) => await _database.ApiKeys().GetAsync(key);
public async Task <Maybe <PagedResult <ApiKey> > > BrowseAsync(BrowseApiKeys query) => await _database.ApiKeys() .Query(query) .PaginateAsync(query);
public async Task <ApiKey> GetAsync(string key) { var apiKey = await _database.ApiKeys().GetByKeyAsync(key); return(apiKey); }