mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-29 14:50:13 -05:00
Allow seed command with argument
This commit is contained in:
@@ -13,20 +13,23 @@ export function SearchInputDev() {
|
||||
|
||||
const handleEnter = () => {
|
||||
const [action, value] = inputValue.split(":");
|
||||
if (!action || !value) return;
|
||||
if (!action) return;
|
||||
|
||||
let fetchUrl = "";
|
||||
switch (action) {
|
||||
case "liu": {
|
||||
if (!value) return;
|
||||
fetchUrl = `/mock-auth?username=${encodeURIComponent(value)}`;
|
||||
break;
|
||||
}
|
||||
case "lit": {
|
||||
if (!value) return;
|
||||
fetchUrl = `/mock-auth?team=${encodeURIComponent(value)}`;
|
||||
break;
|
||||
}
|
||||
case "seed": {
|
||||
fetchUrl = `/seed?variation=${encodeURIComponent(value)}`;
|
||||
if (!value) fetchUrl = "/seed";
|
||||
else fetchUrl = `/seed?variation=${encodeURIComponent(value)}`;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user