Skip to content

Commit 2ed5507

Browse files
authored
Merge pull request #1831 from appwrite/fix-region-deletion
Fix: deletion requests sent to the manager region
2 parents ac3cf3c + a1dd03d commit 2ed5507

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/routes/(console)/project-[region]-[project]/settings/deleteProject.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
import { goto } from '$app/navigation';
33
import { base } from '$app/paths';
44
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
5-
import { BoxAvatar, CardGrid } from '$lib/components';
5+
import { BoxAvatar, Confirm, CardGrid } from '$lib/components';
66
import { Button, InputText } from '$lib/elements/forms';
77
import { toLocaleDateTime } from '$lib/helpers/date';
88
import { addNotification } from '$lib/stores/notifications';
99
import { sdk } from '$lib/stores/sdk';
1010
import { isCloud } from '$lib/system';
11-
import Confirm from '$lib/components/confirm.svelte';
1211
import { project, projectRegion } from '../store';
1312
import { organization } from '$lib/stores/organization';
1413
14+
let error: string;
1515
let showDelete = false;
1616
let name: string = null;
17-
let error: string;
1817
1918
const handleDelete = async () => {
2019
try {
21-
await sdk.forConsole.projects.delete($project.$id);
20+
// send the project to correct region pool for deletion!
21+
await sdk.forConsoleIn($project.region).projects.delete($project.$id);
2222
showDelete = false;
2323
addNotification({
2424
type: 'success',

0 commit comments

Comments
 (0)