mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 16:22:39 +10:00
fix: platformparse case sensitivity
This commit is contained in:
@ -1,15 +1,11 @@
|
|||||||
import { Platform } from "@prisma/client";
|
import { Platform } from "@prisma/client";
|
||||||
|
|
||||||
export function parsePlatform(platform: string) {
|
export function parsePlatform(platform: string) {
|
||||||
switch (platform) {
|
switch (platform.toLowerCase()) {
|
||||||
case "linux":
|
case "linux":
|
||||||
case "Linux":
|
|
||||||
return Platform.Linux;
|
return Platform.Linux;
|
||||||
case "windows":
|
case "windows":
|
||||||
case "Windows":
|
|
||||||
return Platform.Windows;
|
return Platform.Windows;
|
||||||
case "macOS":
|
|
||||||
case "MacOS":
|
|
||||||
case "mac":
|
case "mac":
|
||||||
case "macos":
|
case "macos":
|
||||||
return Platform.macOS;
|
return Platform.macOS;
|
||||||
|
|||||||
Reference in New Issue
Block a user