Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AH-22 pre continuous integration #34

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions API/Controllers/FallbackController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace API.Controllers;

public class FallbackController:Controller
{
[AllowAnonymous]
public IActionResult Index()
{
return PhysicalFile(Path.Combine(Directory.GetCurrentDirectory(),
"wwwroot", "index.html"), "text/HTML");
}
}
30 changes: 0 additions & 30 deletions API/Controllers/WeatherForecastController.cs

This file was deleted.

2 changes: 1 addition & 1 deletion API/Extensions/ApplicationServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class ApplicationServiceExtensions
{
public static IServiceCollection AddApplicationServices(this IServiceCollection services, IConfiguration config)
{
services.AddDbContext<DataContext>(opt => { opt.UseSqlite(config.GetConnectionString("DefaultConnection")); });
services.AddDbContext<DataContext>(opt => { opt.UseSqlServer(config.GetConnectionString("DefaultConnection")); });
services.AddCors(options =>
{
options.AddPolicy("CorsPolicy",
Expand Down
4 changes: 4 additions & 0 deletions API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@
app.UseAuthentication();
app.UseAuthorization();

app.UseDefaultFiles();
app.UseStaticFiles();

app.MapControllers();
app.MapHub<ChatHub>("/chat");
app.MapFallbackToController("Index", "Fallback");

using var scope = app.Services.CreateScope();
var services = scope.ServiceProvider;
Expand Down
12 changes: 0 additions & 12 deletions API/WeatherForecast.cs

This file was deleted.

Binary file modified API/activity-hub.db
Binary file not shown.
2 changes: 1 addition & 1 deletion API/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
},
"ConnectionStrings": {
"DefaultConnection": "Data Source=activity-hub.db"
"DefaultConnection": "Server=localhost,1433;Database=activity-hubs;User Id=SA;Password=Password@1;TrustServerCertificate=True"
},
"TokenKey": "887aa8d55236124da3ae8da02e0809d2140470eb9aa6583686fafed91b9586eb"
}
1,008 changes: 1,008 additions & 0 deletions API/wwwroot/assets/brand-icons-Cu_C0hZ4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/brand-icons-F3SPCeH1.woff
Binary file not shown.
Binary file added API/wwwroot/assets/brand-icons-XL9sxUpA.woff2
Binary file not shown.
Binary file added API/wwwroot/assets/brand-icons-sqJ2Pg7a.eot
Binary file not shown.
Binary file added API/wwwroot/assets/brand-icons-ubhWoxly.ttf
Binary file not shown.
Binary file added API/wwwroot/assets/categoryImages/culture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/categoryImages/drinks.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/categoryImages/film.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/categoryImages/food.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/categoryImages/music.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/categoryImages/travel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/flags-DOLqOU7Y.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/icons-BOCtAERH.woff
Binary file not shown.
Binary file added API/wwwroot/assets/icons-CHzK1VD9.eot
Binary file not shown.
Binary file added API/wwwroot/assets/icons-D29ZQHHw.ttf
Binary file not shown.
Binary file added API/wwwroot/assets/icons-Du6TOHnR.woff2
Binary file not shown.
1,518 changes: 1,518 additions & 0 deletions API/wwwroot/assets/icons-RwhydX30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 126 additions & 0 deletions API/wwwroot/assets/index-bz5KQ_Ib.js

Large diffs are not rendered by default.

354 changes: 354 additions & 0 deletions API/wwwroot/assets/index-eqjGIJcI.css

Large diffs are not rendered by default.

Binary file added API/wwwroot/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
366 changes: 366 additions & 0 deletions API/wwwroot/assets/outline-icons-BfdLr8tr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/outline-icons-DD8jm0uy.ttf
Binary file not shown.
Binary file not shown.
Binary file added API/wwwroot/assets/outline-icons-LX8adJ4n.eot
Binary file not shown.
Binary file added API/wwwroot/assets/outline-icons-aQ88nltS.woff
Binary file not shown.
Binary file added API/wwwroot/assets/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/wwwroot/assets/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions API/wwwroot/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Activity Hub</title>
<script type="module" crossorigin src="/assets/index-bz5KQ_Ib.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-eqjGIJcI.css">
</head>
<body>
<div id="root"></div>
</body>
</html>
1 change: 1 addition & 0 deletions API/wwwroot/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Persistence/DataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected override void OnModelCreating(ModelBuilder builder)
b.HasOne(t => t.Target)
.WithMany(f => f.Followers)
.HasForeignKey(t => t.TargetId)
.OnDelete(DeleteBehavior.Cascade);
.OnDelete(DeleteBehavior.NoAction);
});
}
}
Loading