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:
@@ -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")
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user