Skip to content

Commit

Permalink
Revert "Merge branch 'features/mobiles' into features/assistant-creat…
Browse files Browse the repository at this point in the history
…e-form"

This reverts commit 634fd6d, reversing
changes made to 77befd9.
  • Loading branch information
JoseP3r32 committed May 27, 2024
1 parent 093d04c commit cb9d0c4
Show file tree
Hide file tree
Showing 81 changed files with 8 additions and 3,316 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object Server {
requestTimeout = 0 // disabled
}
install(Auth)
install(Logging) { level = LogLevel.ALL }
install(Logging) { level = LogLevel.INFO }
install(ClientContentNegotiation)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import io.ktor.server.request.*
import io.ktor.server.response.*
import io.ktor.server.routing.*

fun Routing.assistantRoutes(logger: KLogger) {
fun Routing.assistantRoutes(logger: KLogger) {
authenticate("auth-bearer") {
post("/v1/settings/assistants") {
try {
Expand Down Expand Up @@ -103,4 +103,4 @@ fun Routing.assistantRoutes(logger: KLogger) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import com.xebia.functional.xef.server.db.tables.User
import com.xebia.functional.xef.server.db.tables.XefTokens
import kotlinx.serialization.Serializable

@Serializable
data class LoginResponse(val authToken: String, val user: UserResponse)
@Serializable data class LoginResponse(val authToken: String)

@Serializable data class UserResponse(val id: Int, val name: String)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.xebia.functional.xef.server.models.LoginRequest
import com.xebia.functional.xef.server.models.LoginResponse
import com.xebia.functional.xef.server.models.RegisterRequest
import com.xebia.functional.xef.server.models.exceptions.XefExceptions.UserException
import com.xebia.functional.xef.server.models.toUserResponse
import com.xebia.functional.xef.server.utils.HashUtils
import io.github.oshai.kotlinlogging.KLogger
import kotlinx.uuid.UUID
Expand Down Expand Up @@ -34,7 +33,7 @@ class UserRepositoryService(private val logger: KLogger) {
authToken = UUID.generateUUID(passwordHashed).toString()
}
}
LoginResponse(user.authToken, user.toUserResponse())
LoginResponse(user.authToken)
}
}

Expand All @@ -48,7 +47,7 @@ class UserRepositoryService(private val logger: KLogger) {
if (!HashUtils.checkPassword(request.password, user.salt, user.passwordHash))
throw Exception("Invalid password")

LoginResponse(user.authToken, user.toUserResponse())
LoginResponse(user.authToken)
}
}
}
2 changes: 1 addition & 1 deletion server/web/src/utils/api/assistants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ import {

export async function deleteAssistant(authToken: string, id: string): Promise<DeleteAssistantResponse> {
await executeRequest<void>(authToken, 'DELETE', `/${id}`);
}
}
2 changes: 1 addition & 1 deletion server/web/src/utils/api/chatCompletions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export function openai (settings: Settings): OpenAI {
dangerouslyAllowBrowser: true,
apiKey: settings.apiKey, // defaults to process.env["OPENAI_API_KEY"]
});
}
}
153 changes: 0 additions & 153 deletions server/xefMobile/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions server/xefMobile/.idea/vcs.xml

This file was deleted.

Empty file.
15 changes: 0 additions & 15 deletions server/xefMobile/README.MD

This file was deleted.

8 changes: 0 additions & 8 deletions server/xefMobile/build.gradle.kts

This file was deleted.

Loading

0 comments on commit cb9d0c4

Please sign in to comment.