mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
14
packages/rest/__tests__/util.ts
Normal file
14
packages/rest/__tests__/util.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { DefaultRestOptions } from '../src';
|
||||
|
||||
export function genPath(path: string) {
|
||||
return `/api/v${DefaultRestOptions.version}${path}`;
|
||||
}
|
||||
|
||||
export function jsonHeaders(headers: Record<string, string> = {}) {
|
||||
return {
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
...headers,
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user