Files
drop/server/internal/utils/parseplatform.ts
2025-03-11 19:02:53 +11:00

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;
}