diff --git a/Nevyn.sln b/Aberwyn.sln
similarity index 91%
rename from Nevyn.sln
rename to Aberwyn.sln
index 097f5a4..ad2809d 100644
--- a/Nevyn.sln
+++ b/Aberwyn.sln
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nevyn", "Nevyn\Nevyn.csproj", "{423CD237-7404-4355-868F-CE5861835258}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aberwyn", "Aberwyn\Aberwyn.csproj", "{F5586986-B726-4E05-B31B-2E24CA5B2B89}"
EndProject
Global
diff --git a/Aberwyn/.config/dotnet-tools.json b/Aberwyn/.config/dotnet-tools.json
new file mode 100644
index 0000000..b0e38ab
--- /dev/null
+++ b/Aberwyn/.config/dotnet-tools.json
@@ -0,0 +1,5 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {}
+}
\ No newline at end of file
diff --git a/Aberwyn/Aberwyn.csproj b/Aberwyn/Aberwyn.csproj
index 5e012f0..348d660 100644
--- a/Aberwyn/Aberwyn.csproj
+++ b/Aberwyn/Aberwyn.csproj
@@ -8,6 +8,14 @@
Linux
+
+
+
+
+
+
+
+
@@ -21,9 +29,4 @@
-
-
-
-
-
diff --git a/Aberwyn/Dockerfile b/Aberwyn/Dockerfile
index 766d99a..d944d2d 100644
--- a/Aberwyn/Dockerfile
+++ b/Aberwyn/Dockerfile
@@ -2,6 +2,8 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
+RUN mkdir -p /app/build && chmod -R 777 /app/build
+
# Leave the ports exposed to allow Unraid to configure them
EXPOSE 80 443
@@ -10,12 +12,17 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
# Copy the .csproj and restore dependencies
-COPY Aberwyn.csproj ./
+COPY Aberwyn/Aberwyn.csproj ./
RUN dotnet restore
+#COPY Aberwyn/Aberwyn.csproj ./Aberwyn/
+#WORKDIR /src/Aberwyn
+#RUN dotnet restore
+
+
# Copy everything else and build the app
COPY . .
-RUN dotnet build Aberwyn.csproj -c Release -o /app/build
+RUN dotnet build Aberwyn.csproj -c Release -o /app/build/
# Publish the app to the /app/publish folder
FROM build AS publish
diff --git a/Nevyn/.config/dotnet-tools.json b/Nevyn/.config/dotnet-tools.json
deleted file mode 100644
index d7a0783..0000000
--- a/Nevyn/.config/dotnet-tools.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "version": 1,
- "isRoot": true,
- "tools": {
- "microsoft.dotnet-msidentity": {
- "version": "1.0.3",
- "commands": [
- "dotnet-msidentity"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/Nevyn/Classes/Mysql.cs b/Nevyn/Classes/Mysql.cs
deleted file mode 100644
index 091797e..0000000
--- a/Nevyn/Classes/Mysql.cs
+++ /dev/null
@@ -1,210 +0,0 @@
-using MySql.Data.MySqlClient;
-
-namespace Nevyn.Classes
-{
- public class Mysql
- {
- private MySqlConnection connection;
- private string server;
- private string database;
- private string uid;
- private string password;
-
- //Constructor
- public Mysql()
- {
- Initialize();
- }
-
- //Initialize values
- private void Initialize()
- {
- server = "192.168.1.108";
- database = "Nevyn";
- uid = "nevyn";
- password = "";
- string connectionString;
- connectionString = "SERVER=" + server + ";" + "DATABASE=" +
- database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
-
- connection = new MySqlConnection(connectionString);
- }
- //open connection to database
- public bool OpenConnection()
- {
- try
- {
- if (connection.State != System.Data.ConnectionState.Open)
- connection.Open();
- return true;
- }
- catch (MySqlException ex)
- {
- //When handling errors, you can your application's response based
- //on the error number.
- //The two most common error numbers when connecting are as follows:
- //0: Cannot connect to server.
- //1045: Invalid user name and/or password.
- switch (ex.Number)
- {
- case 0:
- Console.Write("Cannot connect to server. Contact administrator");
- break;
-
- case 1045:
- Console.Write("Invalid username/password, please try again");
- break;
- }
- return false;
- }
- }
-
- //Close connection
- public bool CloseConnection()
- {
- try
- {
- connection.Close();
- return true;
- }
- catch (MySqlException ex)
- {
- Console.Write(ex.Message);
- return false;
- }
- }
-
- public Models.Wallet SelectWallet()
- {
- string query = "SELECT * FROM tblWallet";
-
- //Create a list to store the result
- Models.Wallet wallet = new Models.Wallet();
-
- //Open connection
- if (this.OpenConnection() == true)
- {
- //Create Command
- MySqlCommand cmd = new MySqlCommand(query, connection);
- //Create a data reader and Execute the command
- MySqlDataReader dataReader = cmd.ExecuteReader();
-
- //Read the data and store them in the list
- while (dataReader.Read())
- {
- wallet.Id = (int)dataReader["idtblWallet"];
- wallet.Kort = (int)dataReader["Kort"];
- wallet.Buffert = (int)dataReader["Buffert"];
- wallet.Spara = (int)dataReader["Spara"];
-
- }
-
- //close Data Reader
- dataReader.Close();
-
- //close Connection
- this.CloseConnection();
-
- //return list to be displayed
- return wallet;
- }
- else
- {
- return wallet;
- }
- }
-
- public List getBudgetItems(int ID)
- {
- string query = "SELECT * FROM tblBudgetItems WHERE category='" + ID + "'";
-
- //Create a list to store the result
- List budgetItems = new List();
-
- //Open connection
- if (this.OpenConnection() == true)
- {
- //Create Command
- MySqlCommand cmd = new MySqlCommand(query, connection);
- //Create a data reader and Execute the command
- MySqlDataReader dataReader = cmd.ExecuteReader();
-
- //Read the data and store them in the list
- while (dataReader.Read())
- {
- Models.BudgetItem item = new Models.BudgetItem();
- item.ID = (int)dataReader["idtblBudgetItems"];
- item.Name = (string)dataReader["Name"];
- item.Amount = (int)dataReader["Amount"];
- item.Description = (string)dataReader["Description"];
- item.Month = (int)dataReader["Month"];
- item.Year = (int)dataReader["Year"];
- //item.User = (int)dataReader["UserID"];
-
- budgetItems.Add(item);
- }
-
- //close Data Reader
- dataReader.Close();
-
- //close Connection
- //this.CloseConnection();
-
- //return list to be displayed
- return budgetItems;
- }
- else
- {
- return budgetItems;
- }
- }
-
- public List getBudgetCategories()
- {
- string query = "SELECT * FROM tblCategories";
-
- //Create a list to store the result
- List categoryList = new List();
-
- //Open connection
- if (this.OpenConnection() == true)
- {
- //Create Command
- MySqlCommand cmd = new MySqlCommand(query, connection);
- //Create a data reader and Execute the command
- MySqlDataReader dataReader = cmd.ExecuteReader();
-
- //Read the data and store them in the list
- while (dataReader.Read())
- {
- Models.Category category = new Models.Category();
- category.ID = (int)dataReader["idtblCategories"];
- category.Name = (string)dataReader["Name"];
- category.parent = (int)dataReader["parent"];
- categoryList.Add(category);
- }
-
- //close Data Reader
- dataReader.Close();
-
- for (var i = 0; i < categoryList.Count(); i++)
- {
- categoryList[i].Items = this.getBudgetItems(categoryList[i].ID);
-
- }
-
- //close Connection
- this.CloseConnection();
-
-
-
- //return list to be displayed
- return categoryList;
- }
- else
- {
- return categoryList;
- }
- }
- }
-}
diff --git a/Nevyn/Controllers/BudgetController.cs b/Nevyn/Controllers/BudgetController.cs
deleted file mode 100644
index 35d1dfa..0000000
--- a/Nevyn/Controllers/BudgetController.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using Nevyn.Models;
-using Nevyn.Classes;
-
-namespace Nevyn.Controllers
-{
- [Route("api/[controller]")]
- [ApiController]
- public class BudgetController : ControllerBase
- {
- private readonly BudgetContext _context;
- public BudgetController(BudgetContext context)
- {
- _context = context;
- }
-
- // GET: api/ShoppingLists
- [HttpGet]
- public async Task> GetBudget()
- {
- //Budget budget = await _context.UpdateBudget.FindAsync(1);
-
- Budget budget = new Budget();
- budget.updateFromDatabase();
- //_context.UpdateBudget.Add(budget);
- //await _context.SaveChangesAsync();
-
-
- return ItemToDTO(budget);
- }
-
-
- private static BudgetDTO ItemToDTO(Budget budget) =>
- new BudgetDTO
- {
-
- Categories = budget.Categories,
- Debug = "There is days left",
- };
- }
-
-
-}
-
diff --git a/Nevyn/Controllers/MoneyController.cs b/Nevyn/Controllers/MoneyController.cs
deleted file mode 100644
index 14bb504..0000000
--- a/Nevyn/Controllers/MoneyController.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using Nevyn.Models;
-using Nevyn.Classes;
-
-namespace Nevyn.Controllers
-{
- [Route("api/[controller]")]
- [ApiController]
- public class MoneyController : ControllerBase
- {
- private readonly MoneyContext _context;
- public MoneyController(MoneyContext context)
- {
- _context = context;
- }
-
- // GET: api/ShoppingLists
- [HttpGet]
- public async Task> GetWallet()
- {
- Wallet wallet = await _context.UpdateWallet.FindAsync(1);
-
- if (wallet == null)
- {
- wallet = new Wallet();
- wallet.updateFromDatabase();
- _context.UpdateWallet.Add(wallet);
- await _context.SaveChangesAsync();
-
- }
- return ItemToDTO(wallet);
- }
-
- // GET: api/ShoppingLists/5
- [HttpGet("{id}")]
- public async Task> GetWallet(long id)
- {
- var wallet = await _context.UpdateWallet.FindAsync(id);
-
- if (wallet == null)
- {
- return NotFound();
- }
-
- return ItemToDTO(wallet);
- }
-
- // PUT: api/ShoppingLists/5
- // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
- [HttpPut]
- public async Task PutWallet(long id, Wallet wallet)
- {
-
- var currentWallet = await _context.UpdateWallet.FindAsync(wallet.Id);
- if (currentWallet == null)
- {
- return NotFound();
- }
- currentWallet.Kort = wallet.Kort;
- currentWallet.Buffert = wallet.Buffert;
- currentWallet.Fonder = wallet.Fonder;
- currentWallet.Spara = wallet.Spara;
-
-
- await _context.SaveChangesAsync();
-
- return NoContent();
- }
-
- // POST: api/ShoppingLists
- // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
- [HttpPost]
- public async Task> PostWallet(Wallet inputWallet)
- {
-
- var wallet = new Wallet
- {
- Buffert = inputWallet.Buffert,
- Fonder = inputWallet.Fonder,
- Kort = inputWallet.Kort,
- Spara = inputWallet.Spara,
- };
-
- _context.UpdateWallet.Add(wallet);
- await _context.SaveChangesAsync();
-
- return CreatedAtAction(
- nameof(GetWallet),
- new { id = wallet.Id },
- ItemToDTO(wallet));
- }
-
- private static WalletDTO ItemToDTO(Wallet wallet) =>
- new WalletDTO
- {
- Kort = wallet.Kort,
- TotalAmount = wallet.TotalAmount,
- AmountLeftPerDay = wallet.MoneyUntilSalary,
- Debug = "There is " + wallet.DaysLeftUntilSalary + " days left",
- };
- }
-}
diff --git a/Nevyn/Controllers/ShoppingListsController.cs b/Nevyn/Controllers/ShoppingListsController.cs
deleted file mode 100644
index b236017..0000000
--- a/Nevyn/Controllers/ShoppingListsController.cs
+++ /dev/null
@@ -1,127 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using Nevyn.Models;
-
-namespace Nevyn.Controllers
-{
- [Route("api/[controller]")]
- [ApiController]
- public class ShoppingListsController : ControllerBase
- {
- private readonly ShoppingContext _context;
-
- public ShoppingListsController(ShoppingContext context)
- {
- _context = context;
- }
-
- // GET: api/ShoppingLists
- [HttpGet]
- public async Task>> GetUpdateShopping()
- {
- return await _context.UpdateShopping.Select(x => ItemToDTO(x)).ToListAsync();
- }
-
- // GET: api/ShoppingLists/5
- [HttpGet("{id}")]
- public async Task> GetShoppingList(long id)
- {
- var shoppingList = await _context.UpdateShopping.FindAsync(id);
-
- if (shoppingList == null)
- {
- return NotFound();
- }
-
- return ItemToDTO(shoppingList);
- }
-
- // PUT: api/ShoppingLists/5
- // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
- [HttpPut("{id}")]
- public async Task PutShoppingList(long id, ShoppingListDTO shoppingListDTO)
- {
- if (id != shoppingListDTO.Id)
- {
- return BadRequest();
- }
-
- //_context.Entry(shoppingList).State = EntityState.Modified;
-
- var shoppingList = await _context.UpdateShopping.FindAsync(id);
- if (shoppingList == null)
- {
- return NotFound();
- }
-
- shoppingList.Name = shoppingListDTO.Name;
- shoppingList.IsComplete = shoppingListDTO.IsComplete;
-
-
- try
- {
- await _context.SaveChangesAsync();
- }
- catch (DbUpdateConcurrencyException) when (!ShoppingListExists(id))
- {
- return NotFound();
- }
-
- return NoContent();
- }
-
- // POST: api/ShoppingLists
- // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
- [HttpPost]
- public async Task> PostShoppingList(ShoppingListDTO shoppingListDTO)
- {
-
- var shoppingList = new ShoppingList
- {
- IsComplete = shoppingListDTO.IsComplete,
- Name = shoppingListDTO.Name
- };
-
- _context.UpdateShopping.Add(shoppingList);
- await _context.SaveChangesAsync();
-
- return CreatedAtAction(
- nameof(GetShoppingList),
- new { id = shoppingList.Id },
- ItemToDTO(shoppingList));
- }
-
- // DELETE: api/ShoppingLists/5
- [HttpDelete("{id}")]
- public async Task DeleteShoppingList(long id)
- {
- var shoppingList = await _context.UpdateShopping.FindAsync(id);
- if (shoppingList == null)
- {
- return NotFound();
- }
-
- _context.UpdateShopping.Remove(shoppingList);
- await _context.SaveChangesAsync();
-
- return NoContent();
- }
-
- private bool ShoppingListExists(long id)
- {
- return _context.UpdateShopping.Any(e => e.Id == id);
- }
- private static ShoppingListDTO ItemToDTO(ShoppingList shoppingList) =>
- new ShoppingListDTO
- {
- Id = shoppingList.Id,
- Name = shoppingList.Name,
- IsComplete = shoppingList.IsComplete
- };
- }
-}
diff --git a/Nevyn/Dockerfile b/Nevyn/Dockerfile
deleted file mode 100644
index 9eb946d..0000000
--- a/Nevyn/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
-
-FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
-WORKDIR /app
-EXPOSE 80
-EXPOSE 443
-
-FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
-WORKDIR /src
-COPY ["Nevyn/Nevyn.csproj", "Nevyn/"]
-RUN dotnet restore "Nevyn/Nevyn.csproj"
-COPY . .
-WORKDIR "/src/Nevyn"
-RUN dotnet build "Nevyn.csproj" -c Release -o /app/build
-
-FROM build AS publish
-RUN dotnet publish "Nevyn.csproj" -c Release -o /app/publish
-
-FROM base AS final
-WORKDIR /app
-COPY --from=publish /app/publish .
-ENTRYPOINT ["dotnet", "Nevyn.dll"]
\ No newline at end of file
diff --git a/Nevyn/Models/Budget.cs b/Nevyn/Models/Budget.cs
deleted file mode 100644
index 320ccad..0000000
--- a/Nevyn/Models/Budget.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System;
-using MySql.Data.MySqlClient;
-
-namespace Nevyn.Models
-{
- public class Budget
- {
- public int Id { get; set; }
- public List Categories { get; set; }
- public Budget()
- {
- }
-
- //public void getBudgetFromSQL()
- //this = Classes.Mysql.getBudget();
-
- //}
-
- public void updateFromDatabase()
- {
- Classes.Mysql mysql = new Classes.Mysql();
-
- this.Categories = mysql.getBudgetCategories();
- }
- }
-
- public class Category
- {
- public int ID { get; set; }
- public string? Name { get; set; }
- public int parent { get; set; }
- public List Items { get; set; }
- }
-
- public class BudgetItem
- {
- public int ID { get; set; }
- public string? Name { get; set; }
- //public user User { get; set; }
- public int Amount { get; set; }
- public string? Description { get; set; }
- public bool Recurring { get; set; }
- public int Month { get; set; }
- public int Year { get; set; }
-
- }
-
-
- public class BudgetDTO
- {
- public List Categories { get; set; }
- public string Debug { get; set; }
- }
-}
-
diff --git a/Nevyn/Models/BudgetContext.cs b/Nevyn/Models/BudgetContext.cs
deleted file mode 100644
index f203ecf..0000000
--- a/Nevyn/Models/BudgetContext.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore;
-
-namespace Nevyn.Models
-{
- public class BudgetContext : DbContext
- {
- public BudgetContext(DbContextOptions options) : base(options)
- {
-
- }
-
- public DbSet UpdateBudget { get; set; } = null!;
- }
-}
-
diff --git a/Nevyn/Models/Money.cs b/Nevyn/Models/Money.cs
deleted file mode 100644
index c5617bd..0000000
--- a/Nevyn/Models/Money.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using System;
-namespace Nevyn.Models
-{
- public class Wallet
- {
- public int Id { get; set; }
- public int TotalAmount
- {
- get
- {
- return this.Kort + this.Buffert + this.Spara + this.Fonder;
- }
- }
- public int Kort { get; set; }
- public int Buffert { get; set; }
- public int Spara { get; set; }
- public int Fonder { get; set; }
-
- public int MoneyUntilSalary {
- get
- {
- DateTime payDay = SalaryCalculator.CalculatePayDay(DateTime.Now);
- this.DaysLeftUntilSalary = (payDay - DateTime.Now).Days;
- return this.Kort / this.DaysLeftUntilSalary;
- }
- }
- public int DaysLeftUntilSalary { get; set; }
-
- public class SalaryCalculator
- {
- public static DateTime CalculatePayDay(DateTime date)
- {
- // Get the 25th of the current month
- var payDay = new DateTime(date.Year, date.Month, 25);
-
- // If the 25th is on a weekend, get the previous Friday
- if (payDay.DayOfWeek == DayOfWeek.Saturday)
- {
- payDay = payDay.AddDays(-1);
- }
- else if (payDay.DayOfWeek == DayOfWeek.Sunday)
- {
- payDay = payDay.AddDays(-2);
- }
-
- return payDay;
- }
- }
-
- public void updateFromDatabase()
- {
- Classes.Mysql mysql = new Classes.Mysql();
-
- Wallet dbWallet = mysql.SelectWallet();
- this.Kort = dbWallet.Kort;
- this.Spara = dbWallet.Spara;
- this.Buffert = dbWallet.Buffert;
- }
-
-}
-
- public class WalletDTO
- {
- public int Id { get; set; }
- public int TotalAmount { get; set; }
- public int AmountLeftPerDay { get; set; }
- public int Kort { get; set; }
- public string Debug { get; set; }
- }
-
-}
diff --git a/Nevyn/Models/MoneyContext.cs b/Nevyn/Models/MoneyContext.cs
deleted file mode 100644
index 39c2ad4..0000000
--- a/Nevyn/Models/MoneyContext.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace Nevyn.Models
-{
- public class MoneyContext : DbContext
- {
- public MoneyContext(DbContextOptions options) : base(options)
- {
-
- }
-
- public DbSet UpdateWallet { get; set; } = null!;
- }
-}
diff --git a/Nevyn/Models/ShoppingContext.cs b/Nevyn/Models/ShoppingContext.cs
deleted file mode 100644
index 914fbaa..0000000
--- a/Nevyn/Models/ShoppingContext.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace Nevyn.Models
-{
- public class ShoppingContext : DbContext
- {
- public ShoppingContext(DbContextOptions options) : base(options)
- {
-
- }
-
- public DbSet UpdateShopping { get; set; } = null!;
- }
-}
diff --git a/Nevyn/Models/ShoppingList.cs b/Nevyn/Models/ShoppingList.cs
deleted file mode 100644
index 42a99a7..0000000
--- a/Nevyn/Models/ShoppingList.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace Nevyn.Models
-{
- public class ShoppingList
- {
- public long Id { get; set; }
- public int Amount { get; set; }
- public string? Name { get; set; }
- public bool IsComplete { get; set; }
- public string? Secret { get; set; }
-
- }
- public class ShoppingListDTO
- {
- public long Id { get; set; }
- public int Amount { get; set; }
- public string? Name { get; set; }
- public bool IsComplete { get; set; }
-
- }
-}
diff --git a/Nevyn/Nevyn.csproj b/Nevyn/Nevyn.csproj
deleted file mode 100644
index b76d562..0000000
--- a/Nevyn/Nevyn.csproj
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- net6.0
- enable
- enable
- aspnet-Nevyn-7C7F87FA-EADD-461B-8418-8C03C2EF8DB3
- Linux
-
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Nevyn/Program.cs b/Nevyn/Program.cs
deleted file mode 100644
index dc3deb8..0000000
--- a/Nevyn/Program.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using Microsoft.AspNetCore.Authentication;
-using Microsoft.AspNetCore.Authentication.JwtBearer;
-using Microsoft.Identity.Web;
-using Microsoft.EntityFrameworkCore;
-using Nevyn.Models;
-
-var builder = WebApplication.CreateBuilder(args);
-
-// Add services to the container.
-//builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
-
-builder.Services.AddControllers();
-// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
-builder.Services.AddDbContext(opt =>
- opt.UseInMemoryDatabase("ShoppingList"));
-builder.Services.AddDbContext(opt =>
- opt.UseInMemoryDatabase("Wallet"));
-builder.Services.AddDbContext(opt =>
- opt.UseInMemoryDatabase("Budget"));
-builder.Services.AddEndpointsApiExplorer();
-builder.Services.AddSwaggerGen();
-
-var app = builder.Build();
-
-// Configure the HTTP request pipeline.
-//if (app.Environment.IsDevelopment())
-//{
- app.UseSwagger();
- app.UseSwaggerUI();
-//}
-
-//app.UseHttpsRedirection();
-
-//app.UseAuthentication();
-app.UseAuthorization();
-
-app.MapControllers();
-
-app.Run();
diff --git a/Nevyn/Properties/launchSettings.json b/Nevyn/Properties/launchSettings.json
deleted file mode 100644
index 96e7ce2..0000000
--- a/Nevyn/Properties/launchSettings.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "$schema": "https://json.schemastore.org/launchsettings.json",
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:8080",
- "sslPort": 44397
- }
- },
- "profiles": {
- "Nevyn": {
- "commandName": "Project",
- "launchBrowser": true,
- "launchUrl": "swagger",
- "applicationUrl": "http://localhost:8080",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "launchUrl": "swagger",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "Docker": {
- "commandName": "Docker",
- "launchBrowser": true,
- "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
- "environmentVariables": {}
- }
- }
-}
\ No newline at end of file
diff --git a/Nevyn/Properties/serviceDependencies.json b/Nevyn/Properties/serviceDependencies.json
deleted file mode 100644
index dbc3a36..0000000
--- a/Nevyn/Properties/serviceDependencies.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "dependencies": {
- "identityapp1": {
- "type": "identityapp",
- "connectionId": "AzureAD:ClientSecret",
- "dynamicId": null
- }
- }
-}
\ No newline at end of file
diff --git a/Nevyn/Properties/serviceDependencies.local.json b/Nevyn/Properties/serviceDependencies.local.json
deleted file mode 100644
index 9077a71..0000000
--- a/Nevyn/Properties/serviceDependencies.local.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "dependencies": {
- "identityapp1": {
- "secretStore": "LocalSecretsFile",
- "type": "identityapp.secretStore",
- "connectionId": "AzureAD:ClientSecret",
- "dynamicId": null
- }
- }
-}
\ No newline at end of file
diff --git a/Nevyn/appsettings.Development.json b/Nevyn/appsettings.Development.json
deleted file mode 100644
index 0c208ae..0000000
--- a/Nevyn/appsettings.Development.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- }
-}
diff --git a/Nevyn/appsettings.json b/Nevyn/appsettings.json
deleted file mode 100644
index 10f68b8..0000000
--- a/Nevyn/appsettings.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "AllowedHosts": "*"
-}