Skip to content

Commit

Permalink
Fixes the SSL issues
Browse files Browse the repository at this point in the history
  • Loading branch information
N7ghtm4r3 committed Dec 6, 2023
1 parent ab0b8e2 commit 1d9f0be
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 225 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
apply(plugin = "io.spring.dependency-management")

group = "com.tecknobit"
version = "1.0.0"
version = "1.0.1"

repositories {
mavenCentral()
Expand All @@ -19,7 +19,7 @@ dependencies {
testImplementation("org.springframework.boot:spring-boot-starter-test:3.1.5")
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
implementation("com.github.N7ghtm4r3:APIManager:2.1.7")
implementation("com.github.N7ghtm4r3:APIManager:2.2.1")
implementation("org.json:json:20230227")
implementation("org.springframework.boot:spring-boot-starter-web:3.1.5")
implementation("org.springframework.boot:spring-boot-maven-plugin:3.2.0")
Expand All @@ -44,7 +44,7 @@ afterEvaluate {
create<MavenPublication>("maven") {
groupId = "com.tecknobit.pandoro"
artifactId = "Pandoro"
version = "1.0.0"
version = "1.0.1"
from(components["java"])
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tecknobit/pandoro/Launcher.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.tecknobit.pandoro;

import com.tecknobit.apimanager.apis.ServerProtector;
import com.tecknobit.apimanager.exceptions.SaveData;
import com.tecknobit.pandoro.helpers.ServerProtector;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import java.util.Map;

import static com.tecknobit.apimanager.apis.APIRequest.RequestMethod.*;
import static com.tecknobit.apimanager.apis.ServerProtector.SERVER_SECRET_KEY;
import static com.tecknobit.pandoro.Launcher.protector;
import static com.tecknobit.pandoro.controllers.PandoroController.BASE_ENDPOINT;
import static com.tecknobit.pandoro.controllers.UsersController.USERS_ENDPOINT;
import static com.tecknobit.pandoro.helpers.InputsValidatorKt.*;
import static com.tecknobit.pandoro.helpers.ServerProtector.SERVER_SECRET_KEY;
import static com.tecknobit.pandoro.services.UsersHelper.*;

/**
Expand Down
32 changes: 11 additions & 21 deletions src/main/java/com/tecknobit/pandoro/helpers/BaseRequester.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import com.tecknobit.apimanager.annotations.Returner
import com.tecknobit.apimanager.annotations.Structure
import com.tecknobit.apimanager.annotations.Wrapper
import com.tecknobit.apimanager.apis.APIRequest
import com.tecknobit.apimanager.apis.APIRequest.Params
import com.tecknobit.apimanager.apis.APIRequest.RequestMethod.*
import com.tecknobit.apimanager.apis.ServerProtector.SERVER_SECRET_KEY
import com.tecknobit.apimanager.apis.sockets.SocketManager
import com.tecknobit.apimanager.formatters.JsonHelper
import com.tecknobit.pandoro.controllers.*
import com.tecknobit.pandoro.helpers.ServerProtector.SERVER_SECRET_KEY
import com.tecknobit.pandoro.records.users.GroupMember.Role
import com.tecknobit.pandoro.services.GroupsHelper
import com.tecknobit.pandoro.services.ProjectsHelper
Expand Down Expand Up @@ -1165,32 +1166,21 @@ abstract class BaseRequester(
* The **PandoroPayload** class is useful to create the payload for the requests to the Pandoro's backend
*
* @author N7ghtm4r3 - Tecknobit
* @see Params
*/
open class PandoroPayload {
open class PandoroPayload : Params() {

/**
* **payload** -> the payload to asseble for the requests
*/
private val payload = mutableMapOf<String, Any>()

/**
* Function to add a new param value
*
* @param keyParam: key of the param
* @param valueParam: value of the param
*/
fun <T : Any> addParam(keyParam: String, valueParam: T) {
payload[keyParam] = valueParam
}

/**
* Function to get the assembled payload for the requests
* Method to assemble a body params of an **HTTP** request
*
* No-any params required
* @return the payload as [Map] of <[String], [Any]>
*
* @return body params as [String] assembled es. param=mandatory1&param2=mandatory2
*
* @throws IllegalArgumentException when extra params in list is empty or is null
*/
fun getPayload(): Map<String, Any> {
return payload
override fun createPayload(): String {
return super.createPayload().replace("=", "")
}

}
Expand Down
199 changes: 0 additions & 199 deletions src/main/java/com/tecknobit/pandoro/helpers/ServerProtector.java

This file was deleted.

0 comments on commit 1d9f0be

Please sign in to comment.