(null);
diff --git a/packages/hoppscotch-sh-admin/src/main.ts b/packages/hoppscotch-sh-admin/src/main.ts
index 139c96a5c..0a5829683 100644
--- a/packages/hoppscotch-sh-admin/src/main.ts
+++ b/packages/hoppscotch-sh-admin/src/main.ts
@@ -18,6 +18,7 @@ import { auth } from './helpers/auth';
urql,
createClient({
url: import.meta.env.VITE_BACKEND_GQL_URL,
+ requestPolicy: 'network-only',
fetchOptions: () => {
return {
credentials: 'include',
@@ -33,4 +34,4 @@ import { auth } from './helpers/auth';
HOPP_MODULES.forEach((mod) => mod.onVueAppInit?.(app));
app.mount('#app');
-})()
+})();
diff --git a/packages/hoppscotch-sh-admin/src/pages/teams/_id.vue b/packages/hoppscotch-sh-admin/src/pages/teams/_id.vue
index 4cc41f0de..562318ba3 100644
--- a/packages/hoppscotch-sh-admin/src/pages/teams/_id.vue
+++ b/packages/hoppscotch-sh-admin/src/pages/teams/_id.vue
@@ -120,7 +120,7 @@
-
+
{
fetching.value = false;
};
-onMounted(async () => {
- await getTeamInfo();
-});
+onMounted(async () => await getTeamInfo());
+const updateTeam = async () => await getTeamInfo();
// Rename the team name
const showRenameInput = ref(false);
diff --git a/packages/hoppscotch-sh-admin/src/pages/teams/index.vue b/packages/hoppscotch-sh-admin/src/pages/teams/index.vue
index 02347c018..04649a18f 100644
--- a/packages/hoppscotch-sh-admin/src/pages/teams/index.vue
+++ b/packages/hoppscotch-sh-admin/src/pages/teams/index.vue
@@ -245,22 +245,31 @@ const showCreateTeamModal = ref(false);
const getOwnerEmail = (email: string) => (ownerEmail.value = email);
const createTeam = async () => {
+ if (teamName.value.length < 6) {
+ toast.error('Team name should be atleast 6 characters long!!');
+ return;
+ }
+ if (ownerEmail.value.length == 0) {
+ toast.error('Please enter email of team owner!!');
+ return;
+ }
const userUid =
usersList.value.find((user) => user.email === ownerEmail.value)?.uid || '';
const variables = { name: teamName.value.trim(), userUid: userUid };
await createTeamMutation.executeMutation(variables).then((result) => {
if (result.error) {
- if (teamName.value.length < 6) {
- toast.error('Team name should be atleast 6 characters long!!');
- }
if (result.error.toString() == '[GraphQL] user/not_found') {
toast.error('User not found!!');
} else {
toast.error('Failed to create team!!');
}
+ teamName.value = '';
+ ownerEmail.value = '';
} else {
toast.success('Team created successfully!!');
showCreateTeamModal.value = false;
+ teamName.value = '';
+ ownerEmail.value = '';
refetch();
}
});
diff --git a/packages/hoppscotch-sh-admin/vite.config.ts b/packages/hoppscotch-sh-admin/vite.config.ts
index f6729c80e..844c1b9cb 100644
--- a/packages/hoppscotch-sh-admin/vite.config.ts
+++ b/packages/hoppscotch-sh-admin/vite.config.ts
@@ -11,9 +11,9 @@ import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
- envDir: path.resolve(__dirname, "../../"),
+ envDir: path.resolve(__dirname, '../../'),
server: {
- port: 3000,
+ port: 3100,
},
resolve: {
alias: {