mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-10 15:22:56 +03:00
feat: improve initial admin creation workflow
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import playwrightConfig from '../playwright.config';
|
||||
|
||||
export async function cleanupBackend() {
|
||||
export async function cleanupBackend(skipSeed = false) {
|
||||
const url = new URL('/api/test/reset', playwrightConfig.use!.baseURL);
|
||||
|
||||
if (process.env.SKIP_LDAP_TESTS === 'true') {
|
||||
if (process.env.SKIP_LDAP_TESTS === 'true' || skipSeed) {
|
||||
url.searchParams.append('skip-ldap', 'true');
|
||||
}
|
||||
|
||||
if (skipSeed) {
|
||||
url.searchParams.append('skip-seed', 'true');
|
||||
}
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user