mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-09 20:12:10 +10:00
16 lines
319 B
TypeScript
16 lines
319 B
TypeScript
import { Platform } from "~/prisma/client";
|
|
|
|
export function parsePlatform(platform: string) {
|
|
switch (platform.toLowerCase()) {
|
|
case "linux":
|
|
return Platform.Linux;
|
|
case "windows":
|
|
return Platform.Windows;
|
|
case "mac":
|
|
case "macos":
|
|
return Platform.macOS;
|
|
}
|
|
|
|
return undefined;
|
|
}
|