Get the osu! oauth token from MongoDB
I will likely use MongoDB for other things with this website in the future
This commit is contained in:
parent
65884c0754
commit
0d9e4f6ed7
12 changed files with 109 additions and 45 deletions
|
@ -1,5 +1,3 @@
|
|||
import fetch from "node-fetch";
|
||||
|
||||
export async function api<T>(url: string, restful_token?: string): Promise<T> {
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
return (restful_token ? fetch(url, {headers: {"Authorization": `Bearer ${restful_token}`}}) : fetch(url))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue