(
opts: DiscordApiCallOpts & { serverId: string },
)
| 638 | } |
| 639 | |
| 640 | export async function removeServerFromUserCache( |
| 641 | opts: DiscordApiCallOpts & { serverId: string }, |
| 642 | ) { |
| 643 | const cachedServers = await getUserServers(opts); |
| 644 | if (cachedServers) { |
| 645 | const filteredServers = cachedServers.filter( |
| 646 | (server) => server.id !== opts.serverId, |
| 647 | ); |
| 648 | await updateUserServersCache(opts.accessToken, filteredServers); |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | export async function addServerToUserServerCache( |
| 653 | opts: DiscordApiCallOpts & { server: DiscordAPIServerSchema }, |
nothing calls this directly
no test coverage detected