mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
16 lines
466 B
TypeScript
16 lines
466 B
TypeScript
import { SongSearch } from '../../../src-shared/interfaces/search.interface'
|
|
import { serverURL } from '../../../src-shared/Paths'
|
|
|
|
export async function songSearch(search: SongSearch) {
|
|
const response = await fetch(`https://${serverURL}/api/search`, {
|
|
method: 'POST',
|
|
headers: {
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
'Content-Type': 'application/json',
|
|
},
|
|
body: JSON.stringify(search),
|
|
})
|
|
|
|
return await response.json()
|
|
}
|