diff --git a/README.md b/README.md index 41d8ea06..8d9987c0 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,8 @@ for more. ## Tech stack / Miscellaneous Features 🚀 -- Kotlin, Jetpack Compose, Work Manager, Glance API, Material You, Coroutines, Flow, Accompanist, - Navigation Component, Ktor, Room Database, Coil, Dagger Hilt, Mockk etc. +- Kotlin, Jetpack Compose, Work Manager, Glance API, Material You, Coroutines, Flow, Accompanist, Ktor, Room Database, Coil, Dagger Hilt, Mockk etc. +- **[Compose Destinations:](https://github.com/raamcosta/compose-destinations)** Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate. - **Observer Pattern:** Data from the cache would be shown while new data is fetched from the server. Newly retrieved data gets updated immediately on the screen. - **WorkManager:** App uses WorkManager API to update user's subscriptions and to fetch Daily Read @@ -96,8 +96,7 @@ when you create a pull request. Running `spotlessApply` before creating a pull r _cherry on the cake_. * Special thanks to our contributors: - - The first one gets featured here 😎 - - [All contributors](https://github.com/kasem-sm/SlimeKT/graphs/contributors) + - [List of Contributors](https://github.com/kasem-sm/SlimeKT/graphs/contributors) ## Medium Articles related to this project 🖋 diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 19735272..c44aab96 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -6,14 +6,14 @@ val kmongoVersion: String by project plugins { application - kotlin("jvm") version "1.7.0" - id("org.jetbrains.kotlin.plugin.serialization") version "1.7.0" + kotlin("jvm") version "1.7.10" + id("org.jetbrains.kotlin.plugin.serialization") version "1.7.10" id("com.github.johnrengelman.shadow") version "7.1.2" - id("com.diffplug.spotless") version "6.7.2" + id("com.diffplug.spotless") version "6.9.0" } group = "slime.com" -version = "0.0.1" +version = "0.0.2" application { mainClass.set("io.ktor.server.netty.EngineMain") } diff --git a/api/src/main/kotlin/slime/com/data/models/Article.kt b/api/src/main/kotlin/slime/com/data/models/Article.kt index d9121890..02de0386 100644 --- a/api/src/main/kotlin/slime/com/data/models/Article.kt +++ b/api/src/main/kotlin/slime/com/data/models/Article.kt @@ -17,5 +17,5 @@ data class Article( val topic: String, val timestamp: Long = System.currentTimeMillis(), @BsonId - val id: Int = ObjectId().timestamp, + val id: Int = ObjectId().timestamp ) diff --git a/api/src/main/kotlin/slime/com/data/models/RecommendedTopic.kt b/api/src/main/kotlin/slime/com/data/models/RecommendedTopic.kt index 5874cb8e..0f9a9e9b 100644 --- a/api/src/main/kotlin/slime/com/data/models/RecommendedTopic.kt +++ b/api/src/main/kotlin/slime/com/data/models/RecommendedTopic.kt @@ -13,5 +13,5 @@ data class RecommendedTopic( val topicId: String, val topicName: String, @BsonId - val id: String = ObjectId().toString(), + val id: String = ObjectId().toString() ) diff --git a/api/src/main/kotlin/slime/com/data/models/SubscribedTopic.kt b/api/src/main/kotlin/slime/com/data/models/SubscribedTopic.kt index 083c65d2..4afd6dee 100644 --- a/api/src/main/kotlin/slime/com/data/models/SubscribedTopic.kt +++ b/api/src/main/kotlin/slime/com/data/models/SubscribedTopic.kt @@ -14,5 +14,5 @@ data class SubscribedTopic( val topicId: String, val isInExplore: Boolean = false, @BsonId - val id: String = ObjectId().toString(), + val id: String = ObjectId().toString() ) diff --git a/api/src/main/kotlin/slime/com/data/models/Topic.kt b/api/src/main/kotlin/slime/com/data/models/Topic.kt index 9df47dc7..7c270ab9 100644 --- a/api/src/main/kotlin/slime/com/data/models/Topic.kt +++ b/api/src/main/kotlin/slime/com/data/models/Topic.kt @@ -16,5 +16,5 @@ data class Topic( val timestamp: Long = System.currentTimeMillis(), val isInRecommendation: Boolean = false, @BsonId - val id: String = ObjectId().toString(), + val id: String = ObjectId().toString() ) diff --git a/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepository.kt b/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepository.kt index 462355cf..7eda3511 100644 --- a/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepository.kt +++ b/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepository.kt @@ -12,10 +12,10 @@ interface ArticleRepository { suspend fun getArticleById(articleId: Int): Article? suspend fun getAllArticles( topic: String = "", - query: String = "", + query: String = "" ): List
suspend fun getRandomArticleFromSubscription(userId: String? = null): Article? suspend fun getRecommendedArticles( - userId: String? = null, + userId: String? = null ): List
} diff --git a/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepositoryImpl.kt b/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepositoryImpl.kt index 8e45f74f..a8298fda 100644 --- a/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepositoryImpl.kt +++ b/api/src/main/kotlin/slime/com/data/repository/article/ArticleRepositoryImpl.kt @@ -51,14 +51,14 @@ class ArticleRepositoryImpl( override suspend fun getAllArticles( topic: String, - query: String, + query: String ): List
{ val articles = when { topic.isEmpty() && query.isNotEmpty() -> { articleDb.find().filter( or( Article::title regex Regex("(?i).*$query.*"), - Article::author regex Regex("(?i).*$query.*"), + Article::author regex Regex("(?i).*$query.*") ) ).skipAndMap() } @@ -81,7 +81,7 @@ class ArticleRepositoryImpl( ).filter( or( Article::title regex Regex("(?i).*$query.*"), - Article::author regex Regex("(?i).*$query.*"), + Article::author regex Regex("(?i).*$query.*") ) ).skipAndMap() } diff --git a/api/src/main/kotlin/slime/com/data/repository/recommended_topic/RecommendedTopicRepository.kt b/api/src/main/kotlin/slime/com/data/repository/recommendedtopic/RecommendedTopicRepository.kt similarity index 86% rename from api/src/main/kotlin/slime/com/data/repository/recommended_topic/RecommendedTopicRepository.kt rename to api/src/main/kotlin/slime/com/data/repository/recommendedtopic/RecommendedTopicRepository.kt index 0df76796..2132de80 100644 --- a/api/src/main/kotlin/slime/com/data/repository/recommended_topic/RecommendedTopicRepository.kt +++ b/api/src/main/kotlin/slime/com/data/repository/recommendedtopic/RecommendedTopicRepository.kt @@ -2,7 +2,7 @@ * Copyright (C) 2022, Kasem S.M * All rights reserved. */ -package slime.com.data.repository.recommended_topic +package slime.com.data.repository.recommendedtopic import slime.com.data.models.RecommendedTopic diff --git a/api/src/main/kotlin/slime/com/data/repository/recommended_topic/RecommendedTopicRepositoryImpl.kt b/api/src/main/kotlin/slime/com/data/repository/recommendedtopic/RecommendedTopicRepositoryImpl.kt similarity index 92% rename from api/src/main/kotlin/slime/com/data/repository/recommended_topic/RecommendedTopicRepositoryImpl.kt rename to api/src/main/kotlin/slime/com/data/repository/recommendedtopic/RecommendedTopicRepositoryImpl.kt index 2e8f2b02..27994cfb 100644 --- a/api/src/main/kotlin/slime/com/data/repository/recommended_topic/RecommendedTopicRepositoryImpl.kt +++ b/api/src/main/kotlin/slime/com/data/repository/recommendedtopic/RecommendedTopicRepositoryImpl.kt @@ -2,14 +2,14 @@ * Copyright (C) 2022, Kasem S.M * All rights reserved. */ -package slime.com.data.repository.recommended_topic +package slime.com.data.repository.recommendedtopic import org.litote.kmongo.coroutine.CoroutineDatabase import org.litote.kmongo.eq import slime.com.data.models.RecommendedTopic class RecommendedTopicRepositoryImpl( - db: CoroutineDatabase, + db: CoroutineDatabase ) : RecommendedTopicRepository { private val recommendedDb = db.getCollection() diff --git a/api/src/main/kotlin/slime/com/data/repository/subscribed_topic/SubscribeTopicsRepository.kt b/api/src/main/kotlin/slime/com/data/repository/subscribedtopic/SubscribeTopicsRepository.kt similarity index 90% rename from api/src/main/kotlin/slime/com/data/repository/subscribed_topic/SubscribeTopicsRepository.kt rename to api/src/main/kotlin/slime/com/data/repository/subscribedtopic/SubscribeTopicsRepository.kt index b867a817..59911015 100644 --- a/api/src/main/kotlin/slime/com/data/repository/subscribed_topic/SubscribeTopicsRepository.kt +++ b/api/src/main/kotlin/slime/com/data/repository/subscribedtopic/SubscribeTopicsRepository.kt @@ -2,7 +2,7 @@ * Copyright (C) 2022, Kasem S.M * All rights reserved. */ -package slime.com.data.repository.subscribed_topic +package slime.com.data.repository.subscribedtopic import slime.com.data.models.Topic diff --git a/api/src/main/kotlin/slime/com/data/repository/subscribed_topic/SubscribeTopicsRepositoryImpl.kt b/api/src/main/kotlin/slime/com/data/repository/subscribedtopic/SubscribeTopicsRepositoryImpl.kt similarity index 80% rename from api/src/main/kotlin/slime/com/data/repository/subscribed_topic/SubscribeTopicsRepositoryImpl.kt rename to api/src/main/kotlin/slime/com/data/repository/subscribedtopic/SubscribeTopicsRepositoryImpl.kt index a51a687d..fcc4449c 100644 --- a/api/src/main/kotlin/slime/com/data/repository/subscribed_topic/SubscribeTopicsRepositoryImpl.kt +++ b/api/src/main/kotlin/slime/com/data/repository/subscribedtopic/SubscribeTopicsRepositoryImpl.kt @@ -2,7 +2,7 @@ * Copyright (C) 2022, Kasem S.M * All rights reserved. */ -package slime.com.data.repository.subscribed_topic +package slime.com.data.repository.subscribedtopic import org.litote.kmongo.and import org.litote.kmongo.coroutine.CoroutineDatabase @@ -11,7 +11,7 @@ import slime.com.data.models.SubscribedTopic import slime.com.data.models.Topic class SubscribeTopicsRepositoryImpl( - db: CoroutineDatabase, + db: CoroutineDatabase ) : SubscribeTopicsRepository { private val subscribedTopicDb = db.getCollection() @@ -26,7 +26,8 @@ class SubscribeTopicsRepositoryImpl( override suspend fun subscribe(userId: String, topicId: String): Boolean { return subscribedTopicDb.insertOne( SubscribedTopic( - userId = userId, topicId = topicId + userId = userId, + topicId = topicId ) ).wasAcknowledged() } @@ -34,7 +35,8 @@ class SubscribeTopicsRepositoryImpl( override suspend fun unSubscribe(userId: String, topicId: String): Boolean { return subscribedTopicDb.deleteOne( and( - SubscribedTopic::userId eq userId, SubscribedTopic::topicId eq topicId + SubscribedTopic::userId eq userId, + SubscribedTopic::topicId eq topicId ) ).wasAcknowledged() } @@ -42,7 +44,8 @@ class SubscribeTopicsRepositoryImpl( override suspend fun checkAlreadySubscribed(userId: String, topicId: String): Boolean { return subscribedTopicDb.findOne( and( - SubscribedTopic::userId eq userId, SubscribedTopic::topicId eq topicId + SubscribedTopic::userId eq userId, + SubscribedTopic::topicId eq topicId ) ) != null } diff --git a/api/src/main/kotlin/slime/com/data/response/AuthResponse.kt b/api/src/main/kotlin/slime/com/data/response/AuthResponse.kt index fc12a709..b49b208d 100644 --- a/api/src/main/kotlin/slime/com/data/response/AuthResponse.kt +++ b/api/src/main/kotlin/slime/com/data/response/AuthResponse.kt @@ -14,5 +14,5 @@ data class AuthResponse( @SerialName("username") val username: String, @SerialName("token") - val token: String, + val token: String ) diff --git a/api/src/main/kotlin/slime/com/di/MainModule.kt b/api/src/main/kotlin/slime/com/di/MainModule.kt index a2cf4b21..af5c52a4 100644 --- a/api/src/main/kotlin/slime/com/di/MainModule.kt +++ b/api/src/main/kotlin/slime/com/di/MainModule.kt @@ -11,10 +11,10 @@ import slime.com.data.repository.article.ArticleRepository import slime.com.data.repository.article.ArticleRepositoryImpl import slime.com.data.repository.auth.AuthRepository import slime.com.data.repository.auth.AuthRepositoryImpl -import slime.com.data.repository.recommended_topic.RecommendedTopicRepository -import slime.com.data.repository.recommended_topic.RecommendedTopicRepositoryImpl -import slime.com.data.repository.subscribed_topic.SubscribeTopicsRepository -import slime.com.data.repository.subscribed_topic.SubscribeTopicsRepositoryImpl +import slime.com.data.repository.recommendedtopic.RecommendedTopicRepository +import slime.com.data.repository.recommendedtopic.RecommendedTopicRepositoryImpl +import slime.com.data.repository.subscribedtopic.SubscribeTopicsRepository +import slime.com.data.repository.subscribedtopic.SubscribeTopicsRepositoryImpl import slime.com.data.repository.topic.TopicRepository import slime.com.data.repository.topic.TopicRepositoryImpl import slime.com.isDebugMode @@ -40,7 +40,7 @@ val mainModule = module(createdAtStart = true) { TopicRepositoryImpl(get()) } single { - SubscribeTopicsRepositoryImpl(get(),) + SubscribeTopicsRepositoryImpl(get()) } single { RecommendedTopicRepositoryImpl(get()) diff --git a/api/src/main/kotlin/slime/com/plugins/Koin.kt b/api/src/main/kotlin/slime/com/plugins/ConfigureKoin.kt similarity index 100% rename from api/src/main/kotlin/slime/com/plugins/Koin.kt rename to api/src/main/kotlin/slime/com/plugins/ConfigureKoin.kt diff --git a/api/src/main/kotlin/slime/com/plugins/Monitoring.kt b/api/src/main/kotlin/slime/com/plugins/ConfigureMonitoring.kt similarity index 100% rename from api/src/main/kotlin/slime/com/plugins/Monitoring.kt rename to api/src/main/kotlin/slime/com/plugins/ConfigureMonitoring.kt diff --git a/api/src/main/kotlin/slime/com/plugins/Routing.kt b/api/src/main/kotlin/slime/com/plugins/ConfigureRouting.kt similarity index 74% rename from api/src/main/kotlin/slime/com/plugins/Routing.kt rename to api/src/main/kotlin/slime/com/plugins/ConfigureRouting.kt index b541bfce..88688dd7 100644 --- a/api/src/main/kotlin/slime/com/plugins/Routing.kt +++ b/api/src/main/kotlin/slime/com/plugins/ConfigureRouting.kt @@ -11,13 +11,13 @@ import io.ktor.routing.routing import org.koin.ktor.ext.inject import slime.com.data.repository.article.ArticleRepository import slime.com.data.repository.auth.AuthRepository -import slime.com.data.repository.recommended_topic.RecommendedTopicRepository +import slime.com.data.repository.recommendedtopic.RecommendedTopicRepository import slime.com.data.repository.topic.TopicRepository import slime.com.isDebugMode -import slime.com.routes.registerArticleRoutes -import slime.com.routes.registerAuthenticationRoutes -import slime.com.routes.registerSubscribeTopicsRoute -import slime.com.routes.registerTopicRoutes +import slime.com.routes.articleRoutes +import slime.com.routes.authenticationRoutes +import slime.com.routes.subscribeTopicsRoute +import slime.com.routes.topicRoutes import slime.com.service.ArticleService import slime.com.service.SubscriptionService import slime.com.service.UserService @@ -43,10 +43,10 @@ fun Application.configureRouting() { val subscriptionService by inject() routing { - registerAuthenticationRoutes(userService) - registerArticleRoutes(articleService) - registerTopicRoutes(topicRepository, subscriptionService) - registerSubscribeTopicsRoute(subscriptionService, userService, topicRepository) + authenticationRoutes(userService) + articleRoutes(articleService) + topicRoutes(topicRepository, subscriptionService) + subscribeTopicsRoute(subscriptionService, userService, topicRepository) static { resources("static") diff --git a/api/src/main/kotlin/slime/com/plugins/Security.kt b/api/src/main/kotlin/slime/com/plugins/ConfigureSecurity.kt similarity index 100% rename from api/src/main/kotlin/slime/com/plugins/Security.kt rename to api/src/main/kotlin/slime/com/plugins/ConfigureSecurity.kt diff --git a/api/src/main/kotlin/slime/com/routes/ArticleRoutes.kt b/api/src/main/kotlin/slime/com/routes/ArticleRoutes.kt index 6bbd4b31..ab4d3252 100644 --- a/api/src/main/kotlin/slime/com/routes/ArticleRoutes.kt +++ b/api/src/main/kotlin/slime/com/routes/ArticleRoutes.kt @@ -16,7 +16,7 @@ import slime.com.utils.get import slime.com.utils.getUserId import slime.com.utils.respondWith -fun Route.registerArticleRoutes( +fun Route.articleRoutes( service: ArticleService ) { get("/api/article/get/random") { @@ -39,7 +39,8 @@ fun Route.registerArticleRoutes( val query = get("query") ?: "" val articles = service.getAllArticles( - topic = topic, query = query + topic = topic, + query = query ) val articlesResponse = ArticlesResponse( @@ -70,7 +71,8 @@ fun Route.registerArticleRoutes( true -> respondWith(SlimeResponse(true, "Article deleted successfully")) false -> respondWith( SlimeResponse( - false, "Couldn't complete your request, Please try again later" + false, + "Couldn't complete your request, Please try again later" ) ) } diff --git a/api/src/main/kotlin/slime/com/routes/UserRoutes.kt b/api/src/main/kotlin/slime/com/routes/AuthenticationRoutes.kt similarity index 96% rename from api/src/main/kotlin/slime/com/routes/UserRoutes.kt rename to api/src/main/kotlin/slime/com/routes/AuthenticationRoutes.kt index 9bd4ad74..41dae622 100644 --- a/api/src/main/kotlin/slime/com/routes/UserRoutes.kt +++ b/api/src/main/kotlin/slime/com/routes/AuthenticationRoutes.kt @@ -18,7 +18,7 @@ import slime.com.utils.loginUser import slime.com.utils.respondWith import slime.com.utils.respondWithBadRequest -fun Route.registerAuthenticationRoutes( +fun Route.authenticationRoutes( service: UserService ) { post("api/auth/register") { @@ -49,7 +49,7 @@ fun Route.registerAuthenticationRoutes( validateLogin = service::validateCredentialsForLogin, username = username, password = password, - userId = it.id, + userId = it.id ) } ?: kotlin.run { return@post } } @@ -72,7 +72,7 @@ fun Route.registerAuthenticationRoutes( validateLogin = service::validateCredentialsForLogin, username = username, password = password, - userId = it.id, + userId = it.id ) } ?: kotlin.run { respondWith( diff --git a/api/src/main/kotlin/slime/com/routes/SubscribedTopicRoute.kt b/api/src/main/kotlin/slime/com/routes/SubscribeTopicsRoute.kt similarity index 97% rename from api/src/main/kotlin/slime/com/routes/SubscribedTopicRoute.kt rename to api/src/main/kotlin/slime/com/routes/SubscribeTopicsRoute.kt index 4f1081b4..c04bc9a9 100644 --- a/api/src/main/kotlin/slime/com/routes/SubscribedTopicRoute.kt +++ b/api/src/main/kotlin/slime/com/routes/SubscribeTopicsRoute.kt @@ -17,7 +17,7 @@ import slime.com.utils.getUserId import slime.com.utils.respondWith import slime.com.utils.respondWithResult -fun Route.registerSubscribeTopicsRoute( +fun Route.subscribeTopicsRoute( service: SubscriptionService, userService: UserService, topicRepository: TopicRepository diff --git a/api/src/main/kotlin/slime/com/routes/TopicRoutes.kt b/api/src/main/kotlin/slime/com/routes/TopicRoutes.kt index 367aa7f0..4a31e05e 100644 --- a/api/src/main/kotlin/slime/com/routes/TopicRoutes.kt +++ b/api/src/main/kotlin/slime/com/routes/TopicRoutes.kt @@ -16,7 +16,7 @@ import slime.com.utils.get import slime.com.utils.getUserId import slime.com.utils.respondWith -fun Route.registerTopicRoutes( +fun Route.topicRoutes( repository: TopicRepository, subscriptionService: SubscriptionService ) { diff --git a/api/src/main/kotlin/slime/com/service/ArticleService.kt b/api/src/main/kotlin/slime/com/service/ArticleService.kt index 69d01979..d7aa1e7a 100644 --- a/api/src/main/kotlin/slime/com/service/ArticleService.kt +++ b/api/src/main/kotlin/slime/com/service/ArticleService.kt @@ -6,7 +6,7 @@ package slime.com.service import slime.com.data.models.Article import slime.com.data.repository.article.ArticleRepository -import slime.com.data.repository.recommended_topic.RecommendedTopicRepository +import slime.com.data.repository.recommendedtopic.RecommendedTopicRepository import slime.com.data.request.CreateArticleRequest import slime.com.utils.ServiceResult @@ -38,6 +38,7 @@ class ArticleService( suspend fun deleteArticleById(articleId: Int) = articleRepository.deleteArticle(articleId) + @Suppress("Unused") suspend fun validateAndCreateArticle(article: CreateArticleRequest): ServiceResult { article.apply { return when { diff --git a/api/src/main/kotlin/slime/com/service/SubscriptionService.kt b/api/src/main/kotlin/slime/com/service/SubscriptionService.kt index a29fd5be..179cd02a 100644 --- a/api/src/main/kotlin/slime/com/service/SubscriptionService.kt +++ b/api/src/main/kotlin/slime/com/service/SubscriptionService.kt @@ -5,15 +5,15 @@ package slime.com.service import slime.com.data.models.Topic -import slime.com.data.repository.recommended_topic.RecommendedTopicRepository -import slime.com.data.repository.subscribed_topic.SubscribeTopicsRepository +import slime.com.data.repository.recommendedtopic.RecommendedTopicRepository +import slime.com.data.repository.subscribedtopic.SubscribeTopicsRepository import slime.com.data.repository.topic.TopicRepository import slime.com.utils.ServiceResult class SubscriptionService( private val subscribeRepository: SubscribeTopicsRepository, private val topicRepository: TopicRepository, - private val recommendedTopicRepository: RecommendedTopicRepository, + private val recommendedTopicRepository: RecommendedTopicRepository ) { suspend fun getNumber(topicId: String) = subscribeRepository.getNumberOfSubscribers(topicId) @@ -72,7 +72,8 @@ class SubscriptionService( suspend fun checkIfUserSubscribes(userId: String, topicId: String): Boolean { return when { subscribeRepository.checkAlreadySubscribed( - userId = userId, topicId = topicId + userId = userId, + topicId = topicId ) -> true else -> false } @@ -93,7 +94,7 @@ class SubscriptionService( } private suspend fun refreshRecommendedTopic( - currentUserId: String, + currentUserId: String ) { val isNotEmpty = getUserSubscribedTopics(currentUserId).isNotEmpty() if (isNotEmpty) { diff --git a/api/src/main/kotlin/slime/com/service/UserService.kt b/api/src/main/kotlin/slime/com/service/UserService.kt index 3085e67e..620c12ea 100644 --- a/api/src/main/kotlin/slime/com/service/UserService.kt +++ b/api/src/main/kotlin/slime/com/service/UserService.kt @@ -61,7 +61,8 @@ class UserService( (userName.isBlank() || password.isBlank()) -> ServiceResult.Error("Required fields cannot be blank") authRepository.isUsernameAvailable(userName) -> ServiceResult.Error("No such user exists.") !authRepository.verifyPasswordForUsername( - userName, encryptorService.encryptPassword(password) + userName, + encryptorService.encryptPassword(password) ) -> ServiceResult.Error("Invalid Credentials") else -> loginUserAndGenerateToken(userName) } diff --git a/api/src/main/kotlin/slime/com/utils/AuthUtil.kt b/api/src/main/kotlin/slime/com/utils/AuthUtil.kt index e7a4f3ba..c344c5ce 100644 --- a/api/src/main/kotlin/slime/com/utils/AuthUtil.kt +++ b/api/src/main/kotlin/slime/com/utils/AuthUtil.kt @@ -16,7 +16,7 @@ suspend fun PipelineContext.loginUser( validateLogin: suspend (username: String, password: String) -> ServiceResult, username: String, password: String, - userId: String, + userId: String ) { when (val result = validateLogin(username, password)) { is ServiceResult.Success -> {