From 5dc23aa3030c9722bdf45bbb90ee157ebdd8ef17 Mon Sep 17 00:00:00 2001 From: JackDevAU Date: Mon, 11 Dec 2023 10:54:58 +1000 Subject: [PATCH] Remove comments --- SSW.Rules.AzFuncs/Functions/Bookmarks/BookmarkRuleFunction.cs | 1 - .../Functions/Bookmarks/GetAllBookmarkedFunction.cs | 4 ++-- .../Functions/Bookmarks/GetBookmarkStatusFunction.cs | 2 +- SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/SSW.Rules.AzFuncs/Functions/Bookmarks/BookmarkRuleFunction.cs b/SSW.Rules.AzFuncs/Functions/Bookmarks/BookmarkRuleFunction.cs index b032776..7a94cbe 100644 --- a/SSW.Rules.AzFuncs/Functions/Bookmarks/BookmarkRuleFunction.cs +++ b/SSW.Rules.AzFuncs/Functions/Bookmarks/BookmarkRuleFunction.cs @@ -55,7 +55,6 @@ public async Task Run( if (model == null) { - // model = await _client.Bookmarks.Add(data); var response = await dbContext.Bookmarks.Add(data); if (response.IsDefined()) { diff --git a/SSW.Rules.AzFuncs/Functions/Bookmarks/GetAllBookmarkedFunction.cs b/SSW.Rules.AzFuncs/Functions/Bookmarks/GetAllBookmarkedFunction.cs index 95a9ecd..7deb9d5 100644 --- a/SSW.Rules.AzFuncs/Functions/Bookmarks/GetAllBookmarkedFunction.cs +++ b/SSW.Rules.AzFuncs/Functions/Bookmarks/GetAllBookmarkedFunction.cs @@ -17,7 +17,8 @@ public class GetAllBookmarkedFunction( [Function("GetAllBookmarkedFunction")] public async Task Run( - [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequestData req, + [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] + HttpRequestData req, FunctionContext executionContext) { _logger.LogWarning($"HTTP trigger function {nameof(GetAllBookmarkedFunction)} received a request."); @@ -36,7 +37,6 @@ public async Task Run( _logger.LogInformation("Checking for bookmarks by user: {0}", userId); var bookmarks = await dbContext.Bookmarks.Query(q => q.Where(w => w.UserId == userId)); - // var userBookMarks = await bookmarks.Get(q => q.UserId == userId); var bookmarksResult = bookmarks.ToList(); if (bookmarksResult.Count != 0) diff --git a/SSW.Rules.AzFuncs/Functions/Bookmarks/GetBookmarkStatusFunction.cs b/SSW.Rules.AzFuncs/Functions/Bookmarks/GetBookmarkStatusFunction.cs index 6820826..24c2a5b 100644 --- a/SSW.Rules.AzFuncs/Functions/Bookmarks/GetBookmarkStatusFunction.cs +++ b/SSW.Rules.AzFuncs/Functions/Bookmarks/GetBookmarkStatusFunction.cs @@ -44,7 +44,7 @@ public async Task Run( _logger.LogInformation("Checking for bookmark on rule: {0} and user: {1}", ruleGuid, userId); var bookmarks = await dbContext.Bookmarks.Query(q => q.Where(w => w.RuleGuid == ruleGuid && w.UserId == userId)); - // var ruleBookMarks = await bookmarks.Get(q => q.RuleGuid == ruleGuid && q.UserId == userId); + if (bookmarks.Any()) { return req.CreateJsonResponse(new diff --git a/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs b/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs index aa52667..3a58e8f 100644 --- a/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs +++ b/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs @@ -17,7 +17,7 @@ public class UpdateLatestRules(ILoggerFactory loggerFactory, IGitHubClient gitHu [Function("UpdateLatestRules")] public async Task Run( - [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] + [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequestData req, FunctionContext executionContext) {