From 440c22884026c304abaa200cde89920c23050b4d Mon Sep 17 00:00:00 2001 From: rubuy-74 Date: Sat, 3 Aug 2024 10:54:01 +0100 Subject: [PATCH] Minor fixes --- src/main/kotlin/pt/up/fe/ni/website/backend/model/Role.kt | 2 +- .../up/fe/ni/website/backend/repository/ActivityRepository.kt | 1 - .../kotlin/pt/up/fe/ni/website/backend/service/AuthService.kt | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/pt/up/fe/ni/website/backend/model/Role.kt b/src/main/kotlin/pt/up/fe/ni/website/backend/model/Role.kt index cfe1dc40..1b102fce 100644 --- a/src/main/kotlin/pt/up/fe/ni/website/backend/model/Role.kt +++ b/src/main/kotlin/pt/up/fe/ni/website/backend/model/Role.kt @@ -54,6 +54,6 @@ class Role( if (associatedActivities.isEmpty()) { return permissionsPayload } - return "$this.name $permissionsPayload ${associatedActivities.joinToString(" ").trimEnd()}" + return "$name $permissionsPayload ${associatedActivities.joinToString(" ").trimEnd()}" } } diff --git a/src/main/kotlin/pt/up/fe/ni/website/backend/repository/ActivityRepository.kt b/src/main/kotlin/pt/up/fe/ni/website/backend/repository/ActivityRepository.kt index 007df1b4..370f356c 100644 --- a/src/main/kotlin/pt/up/fe/ni/website/backend/repository/ActivityRepository.kt +++ b/src/main/kotlin/pt/up/fe/ni/website/backend/repository/ActivityRepository.kt @@ -7,5 +7,4 @@ import pt.up.fe.ni.website.backend.model.Activity @Repository interface ActivityRepository : CrudRepository { fun findBySlug(slug: String?): T? - fun findByTitle(title: String?): T? } diff --git a/src/main/kotlin/pt/up/fe/ni/website/backend/service/AuthService.kt b/src/main/kotlin/pt/up/fe/ni/website/backend/service/AuthService.kt index a66afcc4..3b87c427 100644 --- a/src/main/kotlin/pt/up/fe/ni/website/backend/service/AuthService.kt +++ b/src/main/kotlin/pt/up/fe/ni/website/backend/service/AuthService.kt @@ -113,6 +113,6 @@ class AuthService( .distinct() .map { SimpleGrantedAuthority(it) - } + } } }