| Ok(await _categoryService.GetCategories(userId)); | Ok(await _categoryService.GetCategories(userId)); | ||||
| [HttpGet("all-categories")] | [HttpGet("all-categories")] | ||||
| public async Task<IActionResult> GetAllCategories() => | |||||
| Ok(await _categoryService.GetAllCategories()); | |||||
| public async Task<IActionResult> GetAllCategories() | |||||
| { | |||||
| User? user = (User?)HttpContext.Items["User"]; | |||||
| return Ok(await _categoryService.GetAllCategories(user.Id)); | |||||
| } | |||||
| [HttpPost] | [HttpPost] | ||||
| public async Task<IActionResult> CreateCategory([FromBody] CreateCategoryDto request) | public async Task<IActionResult> CreateCategory([FromBody] CreateCategoryDto request) |