Skip to content
Draft
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Project Overview

Börsibaar is a full-stack web application with a Spring Boot backend and Next.js frontend. It provides inventory management, transaction tracking, and price optimization features for stock bar themed events. There is also a public page for seeing drink prices in a format that is similar to the stock market.
Trying to stir up some conflictBörsibaar is a full-stack web application with a Spring Boot backend and Next.js frontend. It provides inventory management, transaction tracking, and price optimization features for stock bar themed events. There is also a public page for seeing drink prices in a format that is similar to the stock market.

## Architecture

Expand Down
17 changes: 17 additions & 0 deletions TEAM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Team name:
team-06

Team members:
- Kristina B @megakrista
- Joonas K @JoMarkit
- Holger P @holgerpart
- Marju T @tammmarju
- Triinu M @triinum

Mentor:
- Tavo A @kilpkonn

Workflow:
All development is done in feature branches created from main.
Changes are merged into main via pull requests after review.
Pull requests are reviewed by at least one team member.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public BarStationResponseDto createStation(Long organizationId, BarStationReques
boolean nameExists = existingStations.stream()
.anyMatch(s -> s.getName().equalsIgnoreCase(request.name()));
if (nameExists) {
throw new DuplicateResourceException("A bar station with this name already exists");
throw new DuplicateResourceException("Bar station with this name already exists");
}

BarStation station = BarStation.builder()
Expand Down Expand Up @@ -79,7 +79,7 @@ public BarStationResponseDto updateStation(Long organizationId, Long stationId,
boolean nameExists = existingStations.stream()
.anyMatch(s -> !s.getId().equals(stationId) && s.getName().equalsIgnoreCase(request.name()));
if (nameExists) {
throw new DuplicateResourceException("A bar station with this name already exists");
throw new DuplicateResourceException("Bar station with this name already exists");
}

station.setName(request.name());
Expand Down Expand Up @@ -117,10 +117,10 @@ public void deleteStation(Long organizationId, Long stationId) {
@Transactional(readOnly = true)
public List<BarStationResponseDto> getUserStations(UUID userId, Long organizationId) {
User user = userRepository.findById(userId)
.orElseThrow(() -> new NotFoundException("User not found"));
.orElseThrow(() -> new NotFoundException("User was not found"));

if (!user.getOrganizationId().equals(organizationId)) {
throw new BadRequestException("User does not belong to this organization");
throw new BadRequestException("User " + userId + "Sdoes not belong to this organization");
}

List<BarStation> userStations = user.getBarStations().stream().toList();
Expand Down
11 changes: 11 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.