Merge pull request #1966 from stackernews/rename-to-next-account

Rename to /api/next-account
This commit is contained in:
Keyan 2025-03-11 07:56:46 -05:00 committed by GitHub
commit 8f8b2e4496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ export const AccountProvider = ({ children }) => {
}, [])
const multiAuthSignout = useCallback(async () => {
const { status } = await fetch('/api/signout', { credentials: 'include' })
const { status } = await fetch('/api/next-account', { credentials: 'include' })
// if status is 302, this means the server was able to switch us to the next available account
// and the current account was simply removed from the list of available accounts including the corresponding JWT.
const switchSuccess = status === 302

View File

@ -1,5 +1,5 @@
import * as cookie from 'cookie'
import { datePivot } from '../../lib/time'
import { datePivot } from '@/lib/time'
/**
* @param {NextApiRequest} req