mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-17 16:33:57 +00:00
Compare commits
2 Commits
v1.0.0-dev
...
v1.0.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e92fbdf1f4 | ||
|
|
7e99e49af2 |
@@ -1,7 +1,5 @@
|
|||||||
# Optional token for API calls to the backend
|
# Optional token for API calls to the backend
|
||||||
BACKEND_API_TOKEN=
|
BACKEND_API_TOKEN=
|
||||||
# A URL to the old API to proxy for migration purposes
|
|
||||||
OLD_API_URL=
|
|
||||||
|
|
||||||
# Database connection details
|
# Database connection details
|
||||||
DB_URL=jdbc:h2:./persistence/revanced-api
|
DB_URL=jdbc:h2:./persistence/revanced-api
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
# [1.0.0-dev.3](https://github.com/ReVanced/revanced-api/compare/v1.0.0-dev.2...v1.0.0-dev.3) (2024-07-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Move old API endpoint configuration from env to configuration file ([7e99e49](https://github.com/ReVanced/revanced-api/commit/7e99e49af202c4ec0a0d7e61dd0182dd2097e867))
|
||||||
|
|
||||||
# [1.0.0-dev.2](https://github.com/ReVanced/revanced-api/compare/v1.0.0-dev.1...v1.0.0-dev.2) (2024-07-11)
|
# [1.0.0-dev.2](https://github.com/ReVanced/revanced-api/compare/v1.0.0-dev.1...v1.0.0-dev.2) (2024-07-11)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,3 +15,4 @@ cors-allowed-hosts = [
|
|||||||
"*.revanced.app"
|
"*.revanced.app"
|
||||||
]
|
]
|
||||||
endpoint = "https://api.revanced.app"
|
endpoint = "https://api.revanced.app"
|
||||||
|
old-api-endpoint = "https://old-api.revanced.app"
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
organization = "revanced"
|
|
||||||
patches = { repository = "revanced-patches", asset-regex = "jar$", signature-asset-regex = "asc$", public-key-file = "key.asc" }
|
|
||||||
integrations = { repository = "revanced-integrations", asset-regex = "apk$", signature-asset-regex = "asc$", public-key-file = "key.asc" }
|
|
||||||
contributors-repositories = [
|
|
||||||
"revanced-patcher",
|
|
||||||
"revanced-patches",
|
|
||||||
"revanced-integrations",
|
|
||||||
"revanced-website",
|
|
||||||
"revanced-cli",
|
|
||||||
"revanced-manager",
|
|
||||||
]
|
|
||||||
api-version = 1
|
|
||||||
cors = { host = "*.127.0.0.1:8888", sub-domains = [] }
|
|
||||||
endpoint = "http://127.0.0.1:8888/"
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 1.0.0-dev.2
|
version = 1.0.0-dev.3
|
||||||
|
|||||||
@@ -123,10 +123,11 @@ fun Application.configureDependencies(
|
|||||||
AuthService(issuer, validityInMin, jwtSecret, authSHA256DigestString)
|
AuthService(issuer, validityInMin, jwtSecret, authSHA256DigestString)
|
||||||
}
|
}
|
||||||
single {
|
single {
|
||||||
|
val configuration = get<ConfigurationRepository>()
|
||||||
|
|
||||||
OldApiService(
|
OldApiService(
|
||||||
get {
|
get {
|
||||||
val defaultRequestUri = get<Dotenv>()["OLD_API_URL"]
|
parameterArrayOf(configuration.oldApiEndpoint)
|
||||||
parameterArrayOf(defaultRequestUri)
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import java.io.File
|
|||||||
* @property apiVersion The version to use for the API.
|
* @property apiVersion The version to use for the API.
|
||||||
* @property corsAllowedHosts The hosts allowed to make requests to the API.
|
* @property corsAllowedHosts The hosts allowed to make requests to the API.
|
||||||
* @property endpoint The endpoint of the API.
|
* @property endpoint The endpoint of the API.
|
||||||
|
* @property oldApiEndpoint The endpoint of the old API to proxy requests to.
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
internal class ConfigurationRepository(
|
internal class ConfigurationRepository(
|
||||||
@@ -34,6 +35,8 @@ internal class ConfigurationRepository(
|
|||||||
@SerialName("cors-allowed-hosts")
|
@SerialName("cors-allowed-hosts")
|
||||||
val corsAllowedHosts: Set<String>,
|
val corsAllowedHosts: Set<String>,
|
||||||
val endpoint: String,
|
val endpoint: String,
|
||||||
|
@SerialName("old-api-endpoint")
|
||||||
|
val oldApiEndpoint: String,
|
||||||
) {
|
) {
|
||||||
/**
|
/**
|
||||||
* An asset configuration.
|
* An asset configuration.
|
||||||
|
|||||||
Reference in New Issue
Block a user