Yottabyte  1.0
An AI powerd app meant to detect polluted beaches and organise clean up events.
Yottabyte.Server.Controllers.EventsController Class Reference

Controler for the event management More...

+ Inheritance diagram for Yottabyte.Server.Controllers.EventsController:
+ Collaboration diagram for Yottabyte.Server.Controllers.EventsController:

Public Member Functions

 EventsController (DataContext context, IConfiguration configuration)
 Constructor for the Event Controller More...
 
async Task< ActionResult< IEnumerable< Event > > > GetEvent ()
 Function to returns all of the events More...
 
async Task< ActionResult< Event > > GetEvent (int id)
 Functon to get a event with specific id More...
 
async Task< ActionResult< Response > > PostEvent ([FromForm] EventIM eventIm)
 Function for adding an event to the databas More...
 
async Task< ActionResult< Response > > DeleteEvent (int id)
 Function for deleting a event with a specfic id More...
 
IEnumerable< Claim > ExtractClaims (string jwtToken)
 Function for extracting the claims from JWT Token More...
 

Public Attributes

readonly Dictionary< string, string > fileExtToConType
 Dictionary for converting the file extension to connection type More...
 

Detailed Description

Controler for the event management

Definition at line 37 of file EventsController.cs.

Constructor & Destructor Documentation

◆ EventsController()

Yottabyte.Server.Controllers.EventsController.EventsController ( DataContext  context,
IConfiguration  configuration 
)
inline

Constructor for the Event Controller

Parameters
contextData Context
configurationConfiguration

Definition at line 65 of file EventsController.cs.

Member Function Documentation

◆ DeleteEvent()

async Task< ActionResult< Response > > Yottabyte.Server.Controllers.EventsController.DeleteEvent ( int  id)
inline

Function for deleting a event with a specfic id

Parameters
idId of the event
Returns
Was there a problem

Definition at line 296 of file EventsController.cs.

+ Here is the call graph for this function:

◆ ExtractClaims()

IEnumerable< Claim > Yottabyte.Server.Controllers.EventsController.ExtractClaims ( string  jwtToken)
inline

Function for extracting the claims from JWT Token

Parameters
jwtTokenThe JWT Token
Returns
The claims

Definition at line 378 of file EventsController.cs.

+ Here is the caller graph for this function:

◆ GetEvent() [1/2]

async Task< ActionResult< IEnumerable< Event > > > Yottabyte.Server.Controllers.EventsController.GetEvent ( )
inline

Function to returns all of the events

Returns
All of the events

Definition at line 77 of file EventsController.cs.

◆ GetEvent() [2/2]

async Task< ActionResult< Event > > Yottabyte.Server.Controllers.EventsController.GetEvent ( int  id)
inline

Functon to get a event with specific id

Parameters
idId of the event
Returns
The event

Definition at line 90 of file EventsController.cs.

◆ PostEvent()

async Task< ActionResult< Response > > Yottabyte.Server.Controllers.EventsController.PostEvent ( [FromForm] EventIM  eventIm)
inline

Function for adding an event to the databas

Parameters
eventImEvent input model
Returns
Is there a problem

Definition at line 109 of file EventsController.cs.

+ Here is the call graph for this function:

Member Data Documentation

◆ fileExtToConType

readonly Dictionary<string, string> Yottabyte.Server.Controllers.EventsController.fileExtToConType
Initial value:
= new()
{
{ ".png", "image/x-png" },
{ ".jpg", "image/jpeg" },
{ ".svg", "image/svg+xml" },
{ ".gif", "image/gif" }
}

Dictionary for converting the file extension to connection type

Definition at line 52 of file EventsController.cs.


The documentation for this class was generated from the following file: