add mongo
This commit is contained in:
@@ -15,6 +15,7 @@ export const Home: FC = () => {
|
||||
groups,
|
||||
addGroup,
|
||||
doNotSuggest,
|
||||
baseFactories,
|
||||
ignoredFactories,
|
||||
setIgnoredFactories,
|
||||
store,
|
||||
@@ -40,6 +41,15 @@ export const Home: FC = () => {
|
||||
<button onClick={() => {
|
||||
download('factorio-microservices.bin', store());
|
||||
}}>Store</button>
|
||||
<button onClick={async () => {
|
||||
await fetch( '/api/submit', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({groups, ignored: ignoredFactories, base: baseFactories})
|
||||
})
|
||||
}}>Upload</button>
|
||||
<input type={"file"} multiple={false} ref={inputRef} onChange={async evt => {
|
||||
const stream = evt.currentTarget.files?.[0].stream() as globalThis.ReadableStream<Uint8Array>|undefined
|
||||
if (stream) {
|
||||
|
||||
Reference in New Issue
Block a user