mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-16 17:51:17 +10:00
fix: remove platform
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import prisma from "../db/database";
|
||||
import type { Platform } from "~/prisma/client/enums";
|
||||
import type { HardwarePlatform } from "~/prisma/client/enums";
|
||||
import { useCertificateAuthority } from "~/server/plugins/ca";
|
||||
import type {
|
||||
CapabilityConfiguration,
|
||||
@ -16,7 +16,7 @@ export enum AuthMode {
|
||||
|
||||
export interface ClientMetadata {
|
||||
name: string;
|
||||
platform: Platform;
|
||||
platform: HardwarePlatform;
|
||||
capabilities: Partial<CapabilityConfiguration>;
|
||||
mode: AuthMode;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Platform, type HardwarePlatform } from "~/prisma/client/enums";
|
||||
import { HardwarePlatform } from "~/prisma/client/enums";
|
||||
import prisma from "../db/database";
|
||||
import type { PlatformLink } from "~/prisma/client/client";
|
||||
|
||||
@ -26,7 +26,7 @@ export async function convertIDToLink(
|
||||
});
|
||||
if (link) return link;
|
||||
|
||||
if (Platform[id as Platform]) {
|
||||
if (HardwarePlatform[id as HardwarePlatform]) {
|
||||
return await prisma.platformLink.create({
|
||||
data: {
|
||||
id,
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import { Platform } from "~/prisma/client/enums";
|
||||
import { HardwarePlatform } from "~/prisma/client/enums";
|
||||
|
||||
export function parsePlatform(platform: string) {
|
||||
switch (platform.toLowerCase()) {
|
||||
case "linux":
|
||||
return Platform.Linux;
|
||||
return HardwarePlatform.Linux;
|
||||
case "windows":
|
||||
return Platform.Windows;
|
||||
return HardwarePlatform.Windows;
|
||||
case "mac":
|
||||
case "macos":
|
||||
return Platform.macOS;
|
||||
return HardwarePlatform.macOS;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user