fix: use net.fetch instead of node native fetch

This commit is contained in:
JellyBrick
2023-09-01 21:22:21 +09:00
parent b67a4ed9bb
commit 3e3fdb3c3f
4 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
const { ipcMain } = require('electron');
const { ipcMain, net } = require('electron');
const registerCallback = require('../../providers/song-info');
@ -24,7 +24,7 @@ const post = async (data) => {
'Access-Control-Allow-Origin': '*',
};
const url = `http://127.0.0.1:${port}/`;
fetch(url, {
net.fetch(url, {
method: 'POST',
headers,
body: JSON.stringify({ data }),