Skip to content

Commit

Permalink
Version updates (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Brands (RiwaAdmin) <[email protected]>
  • Loading branch information
rbrands and Robert Brands (RiwaAdmin) authored Jan 15, 2024
1 parent 876ea72 commit c17f5c8
Show file tree
Hide file tree
Showing 53 changed files with 50 additions and 291 deletions.
5 changes: 2 additions & 3 deletions MeetUpFunctions/AddCoGuide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;
using MeetUpPlanner.Shared;
using System.Collections.Generic;

Expand Down Expand Up @@ -65,13 +64,13 @@ public async Task<IActionResult> Run(
int counter = calendarItem.WithoutHost ? 0 : 1;
int waitingCounter = 0;
int coGuideCounter = 0;
bool alreadyRegistered = false;
// bool alreadyRegistered = false;
foreach (Participant p in participants)
{
if (p.ParticipantFirstName.Equals(participant.ParticipantFirstName) && p.ParticipantLastName.Equals(participant.ParticipantLastName))
{
// already registered
alreadyRegistered = true;
// alreadyRegistered = true;
participant.Id = p.Id;
participant.IsWaiting = p.IsWaiting;
}
Expand Down
5 changes: 0 additions & 5 deletions MeetUpFunctions/AddCommentToCalendarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Newtonsoft.Json;
using System.Web.Http;
using MeetUpPlanner.Shared;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;

namespace MeetUpPlanner.Functions
{
Expand Down Expand Up @@ -38,10 +37,6 @@ public AddCommentToCalendarItem(ILogger<AddCommentToCalendarItem> logger,
}

[FunctionName("AddCommentToCalendarItem")]
[OpenApiOperation(Summary = "Add a comment to the referenced CalendarItem.",
Description = "If the CalendarComment already exists (same id) it is overwritten.")]
[OpenApiRequestBody("application/json", typeof(CalendarComment), Description = "New CalendarComment to be written.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
5 changes: 0 additions & 5 deletions MeetUpFunctions/AddCommentToInfoItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Newtonsoft.Json;
using System.Web.Http;
using MeetUpPlanner.Shared;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;

namespace MeetUpPlanner.Functions
{
Expand All @@ -31,10 +30,6 @@ public AddCommentToInfoItem(ILogger<AddCommentToInfoItem> logger,
}

[FunctionName("AddCommentToInfoItem")]
[OpenApiOperation(Summary = "Add a comment to the referenced InfoItem.",
Description = "If the CalendarComment already exists (same id) it is overwritten.")]
[OpenApiRequestBody("application/json", typeof(CalendarComment), Description = "New CalendarComment to be written.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
5 changes: 0 additions & 5 deletions MeetUpFunctions/AddParticipantToCalendarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;
using MeetUpPlanner.Shared;
using System.Collections.Generic;

Expand All @@ -32,10 +31,6 @@ public AddParticipantToCalendarItem(ILogger<AddParticipantToCalendarItem> logger
}

[FunctionName("AddParticipantToCalendarItem")]
[OpenApiOperation(Summary = "Add a participant to the referenced CalendarItem.",
Description = "If the Participants already exists (same id) it is overwritten.")]
[OpenApiRequestBody("application/json", typeof(Participant), Description = "New Participant to be written.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
5 changes: 0 additions & 5 deletions MeetUpFunctions/AssignNewHostToCalendarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;
using MeetUpPlanner.Shared;
using System.Collections.Generic;

Expand All @@ -32,10 +31,6 @@ public AssignNewHostToCalendarItem(ILogger<AssignNewHostToCalendarItem> logger,
}

[FunctionName("AssignNewHostToCalendarItem")]
[OpenApiOperation(Summary = "Assign a new host.",
Description = "The given participant will be assigned as new host for the CalendarItem.")]
[OpenApiRequestBody("application/json", typeof(Participant), Description = "Participant to be the new host.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
7 changes: 0 additions & 7 deletions MeetUpFunctions/CheckKeyword.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using MeetUpPlanner.Shared;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;


namespace MeetUpPlanner.Functions
Expand All @@ -31,10 +28,6 @@ public CheckKeyword(ILogger<CheckKeyword> logger, ServerSettingsRepository serve
/// <param name="log"></param>
/// <returns></returns>
[FunctionName(nameof(CheckKeyword))]
[OpenApiOperation(Summary = "Checks the given keyword and returns if it matches the user or admin keyword.",
Description = "Reading the ServerSettings is only needed for editing for administrators. To be able to read ServerSettings the admin keyword must be set as header x-meetup-keyword.")]
[OpenApiParameter("keyword", Description = "Keyword to be checked.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(KeywordCheck), Description = "With status IsUser and IsAdmin.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req,
ILogger log)
Expand Down
2 changes: 1 addition & 1 deletion MeetUpFunctions/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static class Constants
public const string DEFAULT_DISCLAIMER = "Disclaimer";
public const string DEFAULT_GUEST_DISCLAIMER = "Guest Disclaimer";

public const string VERSION = "2023-09-16";
public const string VERSION = "2024-01-02";
public const int ADMINOVERBOOKFACTOR = 1; // no overbooking any more, because not needed

public const int LOG_TTL = 30 * 24 * 3600; // 30 days TTL for Log items
Expand Down
7 changes: 0 additions & 7 deletions MeetUpFunctions/CopyWeeklysToNextWeek.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using System.Collections.Generic;
using Newtonsoft.Json;
using MeetUpPlanner.Shared;
using System.Web.Http;
using System.Linq;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;



Expand All @@ -36,9 +32,6 @@ public CopyWeeklysToNextWeek(ILogger<CopyWeeklysToNextWeek> logger, ServerSettin
/// <param name="req"></param>
/// <returns></returns>
[FunctionName("CopyWeeklysToNextWeek")]
[OpenApiOperation(Summary = "Copies all CalendarItems marked as weekly to next week.",
Description = "Copies all CalendarItems marked as weekly from current day to next week.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Result of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
5 changes: 0 additions & 5 deletions MeetUpFunctions/DeleteCalendarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;
using MeetUpPlanner.Shared;
using System.Collections.Generic;

Expand Down Expand Up @@ -36,10 +35,6 @@ CosmosDBRepository<Participant> participantRepository
}

[FunctionName("DeleteCalendarItem")]
[OpenApiOperation(Summary = "Deletes a CalendarItem including all corresponding Participant and CalendarComment items.",
Description = "Every CalendarItem has a unique id that is used to delete it.")]
[OpenApiRequestBody("application/json", typeof(CalendarItem), Description = "CalendarItem to be removed.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
5 changes: 0 additions & 5 deletions MeetUpFunctions/DeleteInfoItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;
using MeetUpPlanner.Shared;
using System.Collections.Generic;

Expand All @@ -33,10 +32,6 @@ CosmosDBRepository<CalendarComment> commentRepository
}

[FunctionName("DeleteInfoItem")]
[OpenApiOperation(Summary = "Deletes an InfoItem including all CalendarComment items.",
Description = "Every InfoItem has a unique id that is used to delete it.")]
[OpenApiRequestBody("application/json", typeof(InfoItem), Description = "InfoItem to be removed.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
5 changes: 0 additions & 5 deletions MeetUpFunctions/DeleteMeetingPlace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;
using MeetUpPlanner.Shared;
using System.Collections.Generic;

Expand All @@ -30,10 +29,6 @@ CosmosDBRepository<MeetingPlace> cosmosRepository
}

[FunctionName("DeleteMeetingPlace")]
[OpenApiOperation(Summary = "Deletes a MeetingPlace.",
Description = "Every MeetingPlace has a unique id that is used to delete it.")]
[OpenApiRequestBody("application/json", typeof(InfoItem), Description = "MeetingPlace to be removed.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
6 changes: 0 additions & 6 deletions MeetUpFunctions/ExportTrackingReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
using MeetUpPlanner.Shared;
using System.Web.Http;
using System.Linq;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;
using System.Collections;

namespace MeetUpPlanner.Functions
{
Expand All @@ -38,10 +36,6 @@ public ExportTrackingReport(ILogger<ExportTrackingReport> logger,
}

[FunctionName("ExportTrackingReport")]
[OpenApiOperation(Summary = "Export a list of participants of the given user sharing rides",
Description = "All CalendarItems still in database are scanned for participants who had shared an envent with the given person. To be able to read all ExtendedCalenderItems the admin keyword must be set as header x-meetup-keyword.")]
[OpenApiRequestBody("application/json", typeof(TrackingReportRequest), Description = "Holds all information needed to assemble a tracking report")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(TrackingReport))]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req)
{
Expand Down
4 changes: 0 additions & 4 deletions MeetUpFunctions/GetAllExtendedCalendarItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using MeetUpPlanner.Shared;
using System.Web.Http;
using System.Linq;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;

namespace MeetUpPlanner.Functions
{
Expand All @@ -36,9 +35,6 @@ public GetAllExtendedCalendarItems(ILogger<GetExtendedCalendarItems> logger, Ser
}

[FunctionName("GetAllExtendedCalendarItems")]
[OpenApiOperation(Summary = "Gets all ExtendedCalendarIitems",
Description = "Reading all ExtendedCalendarItems (including particpants and comments) for tracking issues. To be able to read all ExtendedCalenderItems the admin keyword must be set as header x-meetup-keyword.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable<ExtendedCalendarItem>))]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req)
{
Expand Down
8 changes: 0 additions & 8 deletions MeetUpFunctions/GetCalendarItem.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using MeetUpPlanner.Shared;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;


namespace MeetUpPlanner.Functions
Expand All @@ -29,10 +25,6 @@ public GetCalendarItem(ILogger<GetCalendarItem> logger, ServerSettingsRepository
}

[FunctionName("GetCalendarItem")]
[OpenApiOperation(Summary = "Gets the CalendarItem by the given itemId",
Description = "Reading a CalendarItem by id. To be able to read a CalenderItem the user keyword must be set as header x-meetup-keyword.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(CalendarItem))]
[OpenApiParameter("id", Description = "Id of CalendarItem to read.")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "GetCalendarItem/{id}")] HttpRequest req,
string id)
Expand Down
7 changes: 0 additions & 7 deletions MeetUpFunctions/GetCalendarItems.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using System.Collections.Generic;
using Newtonsoft.Json;
using MeetUpPlanner.Shared;
using System.Web.Http;
using System.Linq;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;

namespace MeetUpPlanner.Functions
{
Expand All @@ -29,10 +26,6 @@ public GetCalendarItems(ILogger<GetCalendarItems> logger, ServerSettingsReposito
}

[FunctionName("GetCalendarItems")]
[OpenApiOperation(Summary = "Gets the relevant CalendarIitems",
Description = "Reading current CalendarItems starting in the future or the configured past (in hours). To be able to read CalenderItems the user keyword must be set as header x-meetup-keyword.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable<CalendarItem>))]
[OpenApiParameter("privatekeywords", Description = "Holds a list of private keywords, separated by ;")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req)
{
Expand Down
4 changes: 0 additions & 4 deletions MeetUpFunctions/GetChallengeByTitle.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using MeetUpPlanner.Shared;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;


namespace MeetUpPlanner.Functions
Expand Down
4 changes: 0 additions & 4 deletions MeetUpFunctions/GetClientSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
Expand All @@ -9,7 +8,6 @@
using MeetUpPlanner.Shared;
using Microsoft.Extensions.Configuration;
using MeetUpPlanner.Functions;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;

namespace MeetUpFunctions
{
Expand All @@ -32,8 +30,6 @@ public GetClientSettings(ILogger<GetClientSettings> logger, IConfiguration confi
/// <param name="req"></param>
/// <returns></returns>
[FunctionName(nameof(GetClientSettings))]
[OpenApiOperation(Summary = "Gets the active ClientSettings", Description = "Reading the ClientSettings should be done at the very beginning of the client application.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ClientSettings))]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req)
{
Expand Down
4 changes: 0 additions & 4 deletions MeetUpFunctions/GetContentWithChaptersItem.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using MeetUpPlanner.Shared;
using System.Web.Http;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;


namespace MeetUpPlanner.Functions
Expand Down
6 changes: 0 additions & 6 deletions MeetUpFunctions/GetExportLog.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using System.Collections.Generic;
using Newtonsoft.Json;
using MeetUpPlanner.Shared;
using System.Web.Http;
using System.Linq;
using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes;

namespace MeetUpPlanner.Functions
{
Expand All @@ -29,9 +26,6 @@ public GetExportLog(ILogger<GetExportLog> logger, ServerSettingsRepository serve
}

[FunctionName("GetExportLog")]
[OpenApiOperation(Summary = "Returns all export log items",
Description = "Reading all ExportLogItems. To be able to read ExportLogItems the admin keyword must be set as header x-meetup-keyword.")]
[OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable<ExportLogItem>))]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req)
{
Expand Down
Loading

0 comments on commit c17f5c8

Please sign in to comment.