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

Release #41

Merged
merged 4 commits into from
Mar 10, 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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ To configure the backend, use
the [.NET User Secret Manager](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows#secret-manager)
with the options from the [Configuration](#backend) section.

Before starting the backend, you need to run the database migration scripts:

```bash
# working directory: src/backend/Bennetr.BrickInv.Api/Bennetr.BrickInv.Api
dotnet ef database update --context BrickInvContext
dotnet ef database update --context IdentityContext
```

Then, start the backend:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,12 @@ public async Task<IActionResult> AcceptGroupInvite(string inviteId)

var invite = await context.GroupInvites
.Include(x => x.Recipient)
.Include(x => x.Group)
.Where(x => x.Id == inviteId)
.Where(x => x.Recipient.Id == currentUser.Id)
.FirstAsync();

var group = await context.Groups
.Include(x => x.Members)
.Where(x => x.Id == invite.Group.Id)
.FirstAsync();

group.Members.Add(invite.Recipient);
invite.Group.Members.Add(invite.Recipient);
context.GroupInvites.Remove(invite);

await context.SaveChangesAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public async Task<ActionResult<SetDto>> CreateSet(CreateSetRequest request)

return CreatedAtAction(
nameof(GetSet),
new { id = set.Id },
new { setId = set.Id },
set.Adapt<SetDto>()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task<ActionResult<UserProfileDto>> CreateUserProfile()

return CreatedAtAction(
nameof(GetUserProfile),
new { id = userProfile.Id },
new { userId = userProfile.Id },
userProfile.Adapt<UserProfileDto>()
);
}
Expand Down