-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add placeholders for endpoints
- Loading branch information
Showing
10 changed files
with
355 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace ReasnAPI.Validators; | ||
namespace ReasnAPI.Common; | ||
|
||
public interface IAssemblyMarker | ||
{ | ||
|
139 changes: 139 additions & 0 deletions
139
Server/ReasnAPI/ReasnAPI/Controllers/EventsController.cs
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 |
---|---|---|
@@ -0,0 +1,139 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using ReasnAPI.Models.Database; | ||
|
||
namespace ReasnAPI.Controllers; | ||
|
||
[ApiController] | ||
[Route("[controller]")] | ||
public class EventsController : ControllerBase | ||
{ | ||
private readonly ReasnContext _context; | ||
Check warning on line 11 in Server/ReasnAPI/ReasnAPI/Controllers/EventsController.cs GitHub Actions / dotnet-tests (ubuntu-latest)
Check warning on line 11 in Server/ReasnAPI/ReasnAPI/Controllers/EventsController.cs GitHub Actions / dotnet-tests (macos-latest)
Check warning on line 11 in Server/ReasnAPI/ReasnAPI/Controllers/EventsController.cs GitHub Actions / dotnet-tests (windows-latest)
|
||
|
||
public EventsController(ReasnContext context) | ||
{ | ||
_context = context; | ||
} | ||
|
||
[HttpGet] | ||
public IActionResult GetEvents() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
public IActionResult CreateEvent() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Route("{slug}")] | ||
public IActionResult GetEventBySlug(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPut] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
[Route("{slug}")] | ||
public IActionResult UpdateEvent(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Authorize(Roles = "Admin")] | ||
[Route("requests")] | ||
public IActionResult GetEventsRequests(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Authorize(Roles = "Admin")] | ||
[Route("{slug}/approve")] | ||
public IActionResult ApproveEventRequest(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
[Route("{slug}/images")] | ||
public IActionResult AddEventImage(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPut] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
[Route("{slug}/images/{imageId:int}")] | ||
public IActionResult UpdateEventImage(string slug, int imageId) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpDelete] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
[Route("{slug}/images/{imageId:int}")] | ||
public IActionResult DeleteEventImage(string slug, int imageId) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Route("{slug}/users")] | ||
public IActionResult GetEventUsers(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Route("{slug}/comments")] | ||
public IActionResult GetEventComments(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Authorize] | ||
[Route("{slug}/comments")] | ||
public IActionResult AddEventComment(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
[Route("{slug}/parameters")] | ||
public IActionResult AddEventParameter(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpDelete] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
[Route("{slug}/parameters/{parameterId:int}")] | ||
public IActionResult DeleteEventParameter(string slug, int parameterId) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Authorize(Roles = "Admin, Organizer")] | ||
[Route("parameters")] | ||
public IActionResult GetEventsParameters(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpDelete] | ||
[Authorize(Roles = "Admin")] | ||
[Route("parameters/{parameterId:int}")] | ||
public IActionResult DeleteEventsParameter(int parameterId) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using ReasnAPI.Mappers; | ||
using ReasnAPI.Models.DTOs; | ||
using ReasnAPI.Services; | ||
|
||
namespace ReasnAPI.Controllers; | ||
|
||
[ApiController] | ||
[Authorize] | ||
[Route("[controller]")] | ||
public class MeController : ControllerBase | ||
{ | ||
private readonly UserService _userService; | ||
|
||
public MeController(UserService userService) | ||
{ | ||
_userService = userService; | ||
} | ||
|
||
[HttpGet] | ||
[ProducesResponseType<UserDto>(StatusCodes.Status200OK)] | ||
public IActionResult GetCurrentUser() | ||
{ | ||
var user = _userService.GetCurrentUser(); | ||
return Ok(user.ToDto()); | ||
} | ||
|
||
[HttpPut] | ||
public IActionResult UpdateCurrentUser() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Route("image")] | ||
public IActionResult AddCurrentUserImage() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPut] | ||
[Route("image")] | ||
public IActionResult UpdateCurrentUserImage() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpDelete] | ||
[Route("image")] | ||
public IActionResult DeleteCurrentUserImage() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Route("interests")] | ||
public IActionResult GetCurrentUserInterests() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Route("interests")] | ||
public IActionResult AddCurrentUserInterest() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpDelete] | ||
[Route("interests/{interestId:int}")] | ||
public IActionResult DeleteCurrentUserInterest(int interestId) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Route("events")] | ||
public IActionResult GetCurrentUserEvents() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Route("events/{slug}/enroll")] | ||
public IActionResult EnrollCurrentUserInEvent(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpPost] | ||
[Route("events/{slug}/confirm")] | ||
public IActionResult ConfirmCurrentUserEventAttendance(string slug) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[HttpGet] | ||
[Route("events/recommendations")] | ||
public IActionResult GetCurrentUserEventRecommendations() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
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
Oops, something went wrong.