-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
318 changed files
with
8,279 additions
and
7,982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
using System.Threading.Tasks; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Bakabase.Abstractions.Models.Domain; | ||
using Bakabase.Modules.CustomProperty.Abstractions.Services; | ||
using Bakabase.Abstractions.Models.Domain.Constants; | ||
using Bakabase.Modules.Property.Abstractions.Components; | ||
using Bakabase.Modules.Property.Abstractions.Services; | ||
using Bakabase.Service.Extensions; | ||
using Bakabase.Service.Models.View; | ||
using Bootstrap.Models.ResponseModels; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Swashbuckle.AspNetCore.Annotations; | ||
|
||
namespace Bakabase.Service.Controllers | ||
{ | ||
[Route("~/property")] | ||
public class PropertyController(ICustomPropertyService customPropertyService) : Controller | ||
public class PropertyController(IPropertyService propertyService, IPropertyLocalizer propertyLocalizer) : Controller | ||
{ | ||
private ICustomPropertyService _customPropertyService = customPropertyService; | ||
[HttpGet("pool/{pool}")] | ||
[SwaggerOperation(OperationId = "GetPropertiesByPool")] | ||
public async Task<ListResponse<PropertyViewModel>> GetByPool(PropertyPool pool) | ||
{ | ||
return new ListResponse<PropertyViewModel>( | ||
(await propertyService.GetProperties(pool)).Select(x => x.ToViewModel(propertyLocalizer))); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.