Skip to content

Commit

Permalink
BIL-4: fixing crash with kotlin package change
Browse files Browse the repository at this point in the history
  • Loading branch information
hlafaille committed Dec 28, 2024
1 parent 586e049 commit 3d616ae
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 77 deletions.
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/feature.md

This file was deleted.

14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/general.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Develop
ikoname: Develop
on:
push:
branches:
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
</dependencies>

<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
Expand Down Expand Up @@ -200,7 +201,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.kerosenelabs.billtracker.BilltrackerApplicationKt</mainClass>
<mainClass>com.kerosenelabs.billtracker.BillTrackerApplicationKt</mainClass>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.CrossOrigin
)
@CrossOrigin
@SpringBootApplication
open class BilltrackerApplication
open class BillTrackerApplication

fun main(args: Array<String>) {
runApplication<BilltrackerApplication>(*args)
runApplication<BillTrackerApplication>(*args)
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController

@RestController
@Tag(name = "Expenses", description = "Personal expenses")
class ExpensesController(private val expenseService: Expens eService) {
class ExpensesController(private val expenseService: ExpenseService) {
@PostMapping("/expenses/oneOffs")
@ResponseStatus(HttpStatus.NO_CONTENT)
fun createOneOff(
Expand Down Expand Up @@ -53,14 +53,14 @@ class ExpensesController(private val expenseService: Expens eService) {
)
}

@GetMapping("/expenses/recurringCreators")
@ResponseStatus(HttpStatus.OK)
fun getExpenses(@Parameter(hidden = true) user: UserEntity): GetRecurringExpenseEventCreatorsResponse {
return GetExpenseEventsResponse(
expenseService.(user)
.stream()
.map { entity -> expenseService.mapExpenseEventEntityToExpenseEvent(entity) }
.toList()
)
}
// @GetMapping("/expenses/recurringCreators")
// @ResponseStatus(HttpStatus.OK)
// fun getExpenses(@Parameter(hidden = true) user: UserEntity): GetRecurringExpenseEventCreatorsResponse {
// return GetExpenseEventsResponse(
// expenseService.(user)
// .stream()
// .map { entity -> expenseService.mapExpenseEventEntityToExpenseEvent(entity) }
// .toList()
// )
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class ExpenseService(
* Map a RecurringExpenseEventCreatorEntity (aka an recurring expense event from the database) to a model
* suitable for consumption by the user.
*/
fun mapRecurringExpenseEventCreatorEntityToRecurringExpenseEventCreator(recurringExpenseEventCreator: RecurringExpenseEventCreator): RecurringExpenseEventCreator {
return RecurringExpenseEventCreator(
id = recurringExpenseEventCreator.id!!,
recursEveryCalendarDays = recurringExpenseEventCreator,
)
}
// fun mapRecurringExpenseEventCreatorEntityToRecurringExpenseEventCreator(recurringExpenseEventCreator: RecurringExpenseEventCreator): RecurringExpenseEventCreator {
// return RecurringExpenseEventCreator(
// id = recurringExpenseEventCreator.id!!,
//// recursEveryCalendarDays = recurringExpenseEventCreator,
// )
// }
}

0 comments on commit 3d616ae

Please sign in to comment.