feat: copyable invite links (#4153)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Akash K
2024-06-28 21:18:10 +05:30
committed by GitHub
parent 0c06f26893
commit 2917d50c6a
7 changed files with 119 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
import { runGQLQuery } from "@hoppscotch/common/helpers/backend/GQLClient"
import { InfraPlatformDef } from "@hoppscotch/common/platform/infra"
import { GetSmtpStatusDocument } from "../../api/generated/graphql"
import * as E from "fp-ts/Either"
const getSMTPStatus = () => {
return runGQLQuery({
query: GetSmtpStatusDocument,
variables: {},
})
}
export const InfraPlatform: InfraPlatformDef = {
getIsSMTPEnabled: async () => {
const res = await getSMTPStatus()
if (E.isRight(res)) {
return E.right(res.right.isSMTPEnabled)
}
return E.left("SMTP_STATUS_FETCH_FAILED")
},
}