mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-07 21:07:44 +00:00
fix: server java enums
This commit is contained in:
@@ -74,8 +74,8 @@ const platformAliases: Record<string, keyof typeof languages> = {
|
|||||||
[Platform.ServerPython]: 'py',
|
[Platform.ServerPython]: 'py',
|
||||||
[Platform.ServerRuby]: 'rb',
|
[Platform.ServerRuby]: 'rb',
|
||||||
[Platform.ServerSwift]: 'swift',
|
[Platform.ServerSwift]: 'swift',
|
||||||
[Platform.ServerAndroidJava]: 'java',
|
[Platform.ServerJava]: 'java',
|
||||||
[Platform.ServerAndroidKotlin]: 'kotlin',
|
[Platform.ServerKotlin]: 'kotlin',
|
||||||
[Platform.ServerGraphql]: 'graphql',
|
[Platform.ServerGraphql]: 'graphql',
|
||||||
[Platform.ServerRest]: 'http',
|
[Platform.ServerRest]: 'http',
|
||||||
vue: 'html',
|
vue: 'html',
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ export enum Platform {
|
|||||||
ServerPython = 'server-python',
|
ServerPython = 'server-python',
|
||||||
ServerRuby = 'server-ruby',
|
ServerRuby = 'server-ruby',
|
||||||
ServerSwift = 'server-swift',
|
ServerSwift = 'server-swift',
|
||||||
ServerAndroidKotlin = 'server-kotlin',
|
ServerKotlin = 'server-kotlin',
|
||||||
ServerAndroidJava = 'server-java',
|
ServerJava = 'server-java',
|
||||||
ServerGraphql = 'server-graphql',
|
ServerGraphql = 'server-graphql',
|
||||||
ServerRest = 'server-rest',
|
ServerRest = 'server-rest',
|
||||||
}
|
}
|
||||||
@@ -62,8 +62,8 @@ export const platformMap: Record<Language | string, string> = {
|
|||||||
[Platform.ServerPython]: 'Python',
|
[Platform.ServerPython]: 'Python',
|
||||||
[Platform.ServerRuby]: 'Ruby',
|
[Platform.ServerRuby]: 'Ruby',
|
||||||
[Platform.ServerSwift]: 'Swift',
|
[Platform.ServerSwift]: 'Swift',
|
||||||
[Platform.ServerAndroidKotlin]: 'Kotlin',
|
[Platform.ServerKotlin]: 'Kotlin',
|
||||||
[Platform.ServerAndroidJava]: 'Java',
|
[Platform.ServerJava]: 'Java',
|
||||||
[Platform.ServerGraphql]: 'GraphQL',
|
[Platform.ServerGraphql]: 'GraphQL',
|
||||||
[Platform.ServerRest]: 'REST',
|
[Platform.ServerRest]: 'REST',
|
||||||
sh: 'Shell',
|
sh: 'Shell',
|
||||||
|
|||||||
@@ -208,10 +208,10 @@ export async function getService(
|
|||||||
/**
|
/**
|
||||||
* Exceptions for Android SDK.
|
* Exceptions for Android SDK.
|
||||||
*/
|
*/
|
||||||
const isAndroidJava = platform === Platform.ClientAndroidJava || platform === Platform.ServerAndroidJava;
|
const isAndroidJava = platform === Platform.ClientAndroidJava || platform === Platform.ServerJava;
|
||||||
const isAndroidKotlin = platform === Platform.ClientAndroidKotlin || platform === Platform.ServerAndroidKotlin;
|
const isAndroidKotlin = platform === Platform.ClientAndroidKotlin || platform === Platform.ServerKotlin;
|
||||||
const isAndroid = isAndroidJava || isAndroidKotlin;
|
const isAndroid = isAndroidJava || isAndroidKotlin;
|
||||||
const isAndroidServer = platform === Platform.ServerAndroidJava || platform === Platform.ServerAndroidKotlin;
|
const isAndroidServer = platform === Platform.ServerJava || platform === Platform.ServerKotlin;
|
||||||
const api = await getApi(version, platform);
|
const api = await getApi(version, platform);
|
||||||
const tag = api.tags?.find((n) => n.name === service);
|
const tag = api.tags?.find((n) => n.name === service);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user