mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
19 lines
360 B
TypeScript
19 lines
360 B
TypeScript
import { Platform } from "@prisma/client";
|
|
|
|
export function parsePlatform(platform: string) {
|
|
switch (platform) {
|
|
case "linux":
|
|
case "Linux":
|
|
return Platform.Linux;
|
|
case "windows":
|
|
case "Windows":
|
|
return Platform.Windows;
|
|
case "macOS":
|
|
case "MacOS":
|
|
case "mac":
|
|
return Platform.macOS;
|
|
}
|
|
|
|
return undefined;
|
|
}
|