mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge branch 'main' into I-36-use-pre-built-frontend-image
This commit is contained in:
44
README.md
44
README.md
@@ -72,9 +72,10 @@ Not sure where to get started? [Book a free, non-pressure pairing sessions with
|
||||
|
||||
## Community & Support
|
||||
|
||||
- [GitHub Discussions](https://github.com/Infisical/infisical/discussions) for help with building and discussion.
|
||||
- [GitHub Issues](https://github.com/Infisical/infisical-cli/issues) for any bugs and errors you encounter using Infisical.
|
||||
- [Community Slack](https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g) for hanging out with the community and quick communication with the team.
|
||||
- [Slack](https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g) (For live discussion with the community and the Infisical team)
|
||||
- [GitHub Discussions](https://github.com/Infisical/infisical/discussions) (For help with building and deeper conversations about features)
|
||||
- [GitHub Issues](https://github.com/Infisical/infisical-cli/issues) (For any bugs and errors you encounter using Infisical)
|
||||
- [Twitter](https://twitter.com/infisical) (Get news fast)
|
||||
|
||||
## Status
|
||||
|
||||
@@ -106,17 +107,17 @@ We're currently setting the foundation and building [integrations](https://infis
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/platforms/docker">
|
||||
<a href="https://infisical.com/docs/integrations/platforms/docker?ref=github.com">
|
||||
✔️ Docker
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/platforms/docker-compose">
|
||||
<a href="https://infisical.com/docs/integrations/platforms/docker-compose?ref=github.com">
|
||||
✔️ Docker Compose
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/cloud/heroku">
|
||||
<a href="https://infisical.com/docs/integrations/cloud/heroku?ref=github.com">
|
||||
✔️ Heroku
|
||||
</a>
|
||||
</td>
|
||||
@@ -184,68 +185,75 @@ We're currently setting the foundation and building [integrations](https://infis
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/react">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/react?ref=github.com">
|
||||
✔️ React
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/express">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/express?ref=github.com">
|
||||
✔️ Express
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/gatsby">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/gatsby?ref=github.com">
|
||||
✔️ Gatsby
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/flask">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/flask?ref=github.com">
|
||||
✔️ Flask
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/django">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/django?ref=github.com">
|
||||
✔️ Django
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/laravel">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/laravel?ref=github.com">
|
||||
✔️ Laravel
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/nestjs">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/nestjs?ref=github.com">
|
||||
✔️ NestJS
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/remix">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/remix?ref=github.com">
|
||||
✔️ Remix
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/nextjs">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/nextjs?ref=github.com">
|
||||
✔️ Next.js
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
🔜 Vite
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/vite?ref=github.com">
|
||||
✔️ Vite
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/rails">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/rails?ref=github.com">
|
||||
✔️ Ruby on Rails
|
||||
</a>
|
||||
</td>
|
||||
<td align="left" valign="middle">
|
||||
<a href="https://infisical.com/docs/integrations/frameworks/vue?ref=github.com">
|
||||
✔️ Vue
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -271,4 +279,4 @@ Looking to report a security vulnerability? Please don't post about it in GitHub
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
|
||||
<a href="https://github.com/dangtony98"><img src="https://avatars.githubusercontent.com/u/25857006?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/mv-turtle"><img src="https://avatars.githubusercontent.com/u/78047717?s=96&v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/maidul98"><img src="https://avatars.githubusercontent.com/u/9300960?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/gangjun06"><img src="https://avatars.githubusercontent.com/u/50910815?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/hanywang2"><img src="https://avatars.githubusercontent.com/u/44352119?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/tobias-mintlify"><img src="https://avatars.githubusercontent.com/u/110702161?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/0xflotus"><img src="https://avatars.githubusercontent.com/u/26602940?v=4" width="50" height="50" alt=""/></a>
|
||||
<a href="https://github.com/dangtony98"><img src="https://avatars.githubusercontent.com/u/25857006?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/mv-turtle"><img src="https://avatars.githubusercontent.com/u/78047717?s=96&v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/maidul98"><img src="https://avatars.githubusercontent.com/u/9300960?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/gangjun06"><img src="https://avatars.githubusercontent.com/u/50910815?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/reginaldbondoc"><img src="https://avatars.githubusercontent.com/u/7693108?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/hanywang2"><img src="https://avatars.githubusercontent.com/u/44352119?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/tobias-mintlify"><img src="https://avatars.githubusercontent.com/u/110702161?v=4" width="50" height="50" alt=""/></a> <a href="https://github.com/0xflotus"><img src="https://avatars.githubusercontent.com/u/26602940?v=4" width="50" height="50" alt=""/></a>
|
||||
|
||||
@@ -5,8 +5,8 @@ import { useRouter } from "next/router";
|
||||
import {
|
||||
faGear,
|
||||
faHouse,
|
||||
faLink,
|
||||
faMobile,
|
||||
faPlug,
|
||||
faUser,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||
@@ -124,7 +124,7 @@ export default function Layout({ children }) {
|
||||
{
|
||||
href: "/integrations/" + workspaceMapping[workspaceSelected],
|
||||
title: "Integrations",
|
||||
emoji: <FontAwesomeIcon icon={faLink} />,
|
||||
emoji: <FontAwesomeIcon icon={faPlug} />,
|
||||
},
|
||||
{
|
||||
href: "/settings/project/" + workspaceMapping[workspaceSelected],
|
||||
@@ -242,7 +242,7 @@ export default function Layout({ children }) {
|
||||
<ul>
|
||||
{workspaceList.length > 0 &&
|
||||
menuItems.map(({ href, title, emoji }) => (
|
||||
<li className="mt-1.5 mx-2" key={title}>
|
||||
<li className="mt-0.5 mx-2" key={title}>
|
||||
{router.asPath.split("/")[1] === href.split("/")[1] &&
|
||||
(["project", "billing", "org", "personal"].includes(
|
||||
router.asPath.split("/")[2]
|
||||
@@ -250,23 +250,23 @@ export default function Layout({ children }) {
|
||||
? router.asPath.split("/")[2] === href.split("/")[2]
|
||||
: true) ? (
|
||||
<div
|
||||
className={`flex p-2 text-white text-sm rounded cursor-pointer bg-mineshaft-50/10`}
|
||||
className={`flex relative px-0.5 py-2.5 text-white text-sm rounded cursor-pointer bg-primary-50/10`}
|
||||
>
|
||||
<div className="bg-primary w-1 rounded-xl mr-1"></div>
|
||||
<p className="ml-2 mr-4">{emoji}</p>
|
||||
<div className="absolute top-0 my-1 ml-1 inset-0 bg-primary w-1 rounded-xl mr-1"></div>
|
||||
<p className="w-6 ml-4 mr-2 flex items-center justify-center text-lg">{emoji}</p>
|
||||
{title}
|
||||
</div>
|
||||
) : router.asPath == "/noprojects" ? (
|
||||
<div className={`flex p-2 text-white text-sm rounded`}>
|
||||
<p className="ml-2 mr-4">{emoji}</p>
|
||||
<div className={`flex p-2.5 text-white text-sm rounded`}>
|
||||
<p className="w-10 flex items-center justify-center text-lg">{emoji}</p>
|
||||
{title}
|
||||
</div>
|
||||
) : (
|
||||
<Link href={href}>
|
||||
<div
|
||||
className={`flex p-2 text-white text-sm rounded cursor-pointer hover:bg-mineshaft-50/5`}
|
||||
className={`flex p-2.5 text-white text-sm rounded cursor-pointer hover:bg-primary-50/5`}
|
||||
>
|
||||
<p className="ml-2 mr-4">{emoji}</p>
|
||||
<p className="w-10 flex items-center justify-center text-lg">{emoji}</p>
|
||||
{title}
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
@@ -75,7 +75,7 @@ const DashboardInputField = ({
|
||||
blurred
|
||||
? "text-transparent group-hover:text-transparent focus:text-transparent active:text-transparent"
|
||||
: ""
|
||||
} z-10 peer font-mono ph-no-capture bg-transparent rounded-md caret-white text-transparent text-md px-2 py-1.5 w-full min-w-16 outline-none focus:ring-2 focus:ring-primary/50 duration-200`}
|
||||
} z-10 peer font-mono ph-no-capture bg-transparent rounded-md caret-white text-transparent text-md px-2 py-1.5 w-full min-w-16 outline-none focus:ring-2 focus:ring-primary/50 duration-200 no-scrollbar no-scrollbar::-webkit-scrollbar`}
|
||||
spellCheck="false"
|
||||
/>
|
||||
<div
|
||||
@@ -84,7 +84,7 @@ const DashboardInputField = ({
|
||||
blurred
|
||||
? "text-bunker-800 group-hover:text-gray-400 peer-focus:text-gray-400 peer-active:text-gray-400"
|
||||
: ""
|
||||
} flex flex-row whitespace-pre font-mono absolute z-0 ph-no-capture max-w-2xl overflow-x-scroll bg-bunker-800 h-9 rounded-md text-gray-400 text-md px-2 py-1.5 w-full min-w-16 outline-none focus:ring-2 focus:ring-primary/50 duration-100`}
|
||||
} absolute flex flex-row whitespace-pre font-mono z-0 ph-no-capture max-w-2xl overflow-x-scroll bg-bunker-800 h-9 rounded-md text-gray-400 text-md px-2 py-1.5 w-full min-w-16 outline-none focus:ring-2 focus:ring-primary/50 duration-100 no-scrollbar no-scrollbar::-webkit-scrollbar`}
|
||||
>
|
||||
{
|
||||
value
|
||||
@@ -115,18 +115,18 @@ const DashboardInputField = ({
|
||||
}
|
||||
</div>
|
||||
{blurred && (
|
||||
<div className="z-20 peer pr-2 bg-bunker-800 group-hover:hidden peer-hover:hidden peer-focus:hidden peer-active:invisible absolute h-9 w-fit max-w-xl rounded-md flex items-center text-gray-400/50 text-clip overflow-hidden">
|
||||
<p className="ml-2"></p>
|
||||
{value
|
||||
.split("")
|
||||
.slice(0, 42)
|
||||
.map(() => (
|
||||
<FontAwesomeIcon
|
||||
key={guidGenerator()}
|
||||
className="text-xxs mx-0.5"
|
||||
icon={faCircle}
|
||||
/>
|
||||
))}
|
||||
<div className="absolute flex flex-row items-center z-20 peer pr-2 bg-bunker-800 group-hover:hidden peer-hover:hidden peer-focus:hidden peer-active:invisible h-9 w-full max-w-2xl rounded-md text-gray-400/50 text-clip">
|
||||
<div className="px-2 flex flex-row items-center overflow-x-scroll no-scrollbar no-scrollbar::-webkit-scrollbar">
|
||||
{value
|
||||
.split("")
|
||||
.map(() => (
|
||||
<FontAwesomeIcon
|
||||
key={guidGenerator()}
|
||||
className="text-xxs mx-0.5"
|
||||
icon={faCircle}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { PATH } from "~/const";
|
||||
import token from "~/pages/api/auth/Token";
|
||||
|
||||
export default class SecurityClient {
|
||||
static authOrigins = [PATH];
|
||||
static #token = "";
|
||||
|
||||
contructor() {}
|
||||
@@ -13,13 +11,12 @@ export default class SecurityClient {
|
||||
|
||||
static async fetchCall(resource, options) {
|
||||
let req = new Request(resource, options);
|
||||
const destOrigin = new URL(req.url).origin;
|
||||
|
||||
if (this.#token == "") {
|
||||
this.setToken(await token());
|
||||
}
|
||||
|
||||
if (this.#token && this.authOrigins.includes(destOrigin)) {
|
||||
if (this.#token) {
|
||||
req.headers.set("Authorization", "Bearer " + this.#token);
|
||||
return fetch(req);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
export const PATH = process.env.NEXT_PUBLIC_WEBSITE_URL;
|
||||
|
||||
export const publicPaths = [
|
||||
`/`,
|
||||
// `/integrations`,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -14,7 +13,7 @@ const changePassword2 = ({
|
||||
verifier,
|
||||
clientProof,
|
||||
}) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/password/change-password", {
|
||||
return SecurityClient.fetchCall("/api/v1/password/change-password", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient.js";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient.js";
|
||||
* @returns
|
||||
*/
|
||||
const checkAuth = async (req, res) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/auth/checkAuth", {
|
||||
return SecurityClient.fetchCall("/api/v1/auth/checkAuth", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This route check the verification code from the email that user just recieved
|
||||
* @param {*} email
|
||||
@@ -7,7 +5,7 @@ import { PATH } from "~/const";
|
||||
* @returns
|
||||
*/
|
||||
const checkEmailVerificationCode = (email, code) => {
|
||||
return fetch(PATH + "/api/v1/signup/email/verify", {
|
||||
return fetch("/api/v1/signup/email/verify", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This function is called in the end of the signup process.
|
||||
* It sends all the necessary nformation to the server.
|
||||
@@ -28,7 +26,7 @@ const completeAccountInformationSignup = ({
|
||||
verifier,
|
||||
token,
|
||||
}) => {
|
||||
return fetch(PATH + "/api/v1/signup/complete-account/signup", {
|
||||
return fetch("/api/v1/signup/complete-account/signup", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This function is called in the end of the signup process.
|
||||
* It sends all the necessary nformation to the server.
|
||||
@@ -26,7 +24,7 @@ const completeAccountInformationSignupInvite = ({
|
||||
verifier,
|
||||
token,
|
||||
}) => {
|
||||
return fetch(PATH + "/api/v1/signup/complete-account/invite", {
|
||||
return fetch("/api/v1/signup/complete-account/invite", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -13,7 +12,7 @@ const issueBackupPrivateKey = ({
|
||||
clientProof,
|
||||
}) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/password/backup-private-key",
|
||||
"/api/v1/password/backup-private-key",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This is the first step of the login process (pake)
|
||||
* @param {*} email
|
||||
@@ -7,7 +5,7 @@ import { PATH } from "~/const";
|
||||
* @returns
|
||||
*/
|
||||
const login1 = (email, clientPublicKey) => {
|
||||
return fetch(PATH + "/api/v1/auth/login1", {
|
||||
return fetch("/api/v1/auth/login1", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This is the second step of the login process
|
||||
* @param {*} email
|
||||
@@ -7,7 +5,7 @@ import { PATH } from "~/const";
|
||||
* @returns
|
||||
*/
|
||||
const login2 = (email, clientProof) => {
|
||||
return fetch(PATH + "/api/v1/auth/login2", {
|
||||
return fetch("/api/v1/auth/login2", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const logout = async (req, res) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/auth/logout", {
|
||||
return SecurityClient.fetchCall("/api/v1/auth/logout", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -7,7 +6,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const SRP1 = ({ clientPublicKey }) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/password/srp1", {
|
||||
return SecurityClient.fetchCall("/api/v1/password/srp1", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This route send the verification email to the user's email (contains a 6-digit verification code)
|
||||
* @param {*} email
|
||||
*/
|
||||
const sendVerificationEmail = (email) => {
|
||||
fetch(PATH + "/api/v1/signup/email/signup", {
|
||||
fetch("/api/v1/signup/email/signup", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
const token = async (req, res) => {
|
||||
return fetch(PATH + "/api/v1/auth/token", {
|
||||
return fetch("/api/v1/auth/token", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This route verifies the signup invite link
|
||||
* @param {*} email
|
||||
@@ -7,7 +5,7 @@ import { PATH } from "~/const";
|
||||
* @returns
|
||||
*/
|
||||
const verifySignupInvite = ({ email, code }) => {
|
||||
return fetch(PATH + "/api/v1/invite-org/verify", {
|
||||
return fetch("/api/v1/invite-org/verify", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
|
||||
/**
|
||||
* This route lets us get the public key of infisical. Th euser doesn't have to be authenticated since this is just the public key.
|
||||
* @param {*} req
|
||||
@@ -7,7 +5,7 @@ import { PATH } from "~/const";
|
||||
* @returns
|
||||
*/
|
||||
const publicKeyInfisical = (req, res) => {
|
||||
return fetch(PATH + "/api/v1/key/publicKey/infisical", {
|
||||
return fetch("/api/v1/key/publicKey/infisical", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient.js";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,6 @@ import SecurityClient from "~/utilities/SecurityClient.js";
|
||||
*/
|
||||
const getSecrets = async (workspaceId, env) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH +
|
||||
"/api/v1/secret/" +
|
||||
workspaceId +
|
||||
"?" +
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const uploadSecrets = async ({ workspaceId, secrets, keys, environment }) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/secret/" + workspaceId, {
|
||||
return SecurityClient.fetchCall("/api/v1/secret/" + workspaceId, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
const changeHerokuConfigVars = ({ integrationId, key, secrets }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/integration/" + integrationId + "/sync",
|
||||
"/api/v1/integration/" + integrationId + "/sync",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const deleteIntegration = ({ integrationId }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/integration/" + integrationId,
|
||||
"/api/v1/integration/" + integrationId,
|
||||
{
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const deleteIntegrationAuth = ({ integrationAuthId }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/integration-auth/" + integrationAuthId,
|
||||
"/api/v1/integration-auth/" + integrationAuthId,
|
||||
{
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
const getIntegrationApps = ({ integrationAuthId }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/integration-auth/" + integrationAuthId + "/apps",
|
||||
"/api/v1/integration-auth/" + integrationAuthId + "/apps",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
const getIntegrations = () => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/integration/integrations", {
|
||||
return SecurityClient.fetchCall("/api/v1/integration/integrations", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const startIntegration = ({ integrationId, appName, environment }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/integration/" + integrationId,
|
||||
"/api/v1/integration/" + integrationId,
|
||||
{
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const AuthorizeIntegration = ({ workspaceId, code, integration }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/integration-auth/oauth-token",
|
||||
"/api/v1/integration-auth/oauth-token",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getWorkspaceAuthorizations = ({ workspaceId }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + workspaceId + "/authorizations",
|
||||
"/api/v1/workspace/" + workspaceId + "/authorizations",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getWorkspaceIntegrations = ({ workspaceId }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + workspaceId + "/integrations",
|
||||
"/api/v1/workspace/" + workspaceId + "/integrations",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const getOrganization = (req, res) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/organization/" + req.orgId, {
|
||||
return SecurityClient.fetchCall("/api/v1/organization/" + req.orgId, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getOrganizationProjects = (req, res) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/organization/" + req.orgId + "/workspaces",
|
||||
"/api/organization/" + req.orgId + "/workspaces",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getOrganizationSubscriptions = (req, res) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + req.orgId + "/subscriptions",
|
||||
"/api/v1/organization/" + req.orgId + "/subscriptions",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getOrganizationUserProjects = (req, res) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + req.orgId + "/my-workspaces",
|
||||
"/api/v1/organization/" + req.orgId + "/my-workspaces",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getOrganizationUsers = (req, res) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + req.orgId + "/users",
|
||||
"/api/v1/organization/" + req.orgId + "/users",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const StripeRedirect = ({ orgId }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + orgId + "/customer-portal-session",
|
||||
"/api/v1/organization/" + orgId + "/customer-portal-session",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const addIncidentContact = (organizationId, email) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + organizationId + "/incidentContactOrg",
|
||||
"/api/v1/organization/" + organizationId + "/incidentContactOrg",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const addUserToOrg = (email, orgId) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/invite-org/signup", {
|
||||
return SecurityClient.fetchCall("/api/v1/invite-org/signup", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const deleteIncidentContact = (organizaionId, email) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + organizaionId + "/incidentContactOrg",
|
||||
"/api/v1/organization/" + organizaionId + "/incidentContactOrg",
|
||||
{
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const deleteUserFromOrganization = (membershipId) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/membership-org/" + membershipId,
|
||||
"/api/v1/membership-org/" + membershipId,
|
||||
{
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getIncidentContacts = (organizationId) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + organizationId + "/incidentContactOrg",
|
||||
"/api/v1/organization/" + organizationId + "/incidentContactOrg",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const getOrganizations = (req, res) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/organization", {
|
||||
return SecurityClient.fetchCall("/api/v1/organization", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const renameOrg = (orgId, newOrgName) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/organization/" + orgId + "/name",
|
||||
"/api/v1/organization/" + orgId + "/name",
|
||||
{
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -15,7 +14,7 @@ const addServiceToken = ({
|
||||
encryptedKey,
|
||||
nonce,
|
||||
}) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/service-token/", {
|
||||
return SecurityClient.fetchCall("/api/v1/service-token/", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getServiceTokens = ({ workspaceId }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + workspaceId + "/service-tokens",
|
||||
"/api/v1/workspace/" + workspaceId + "/service-tokens",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const getUser = (req, res) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/user", {
|
||||
return SecurityClient.fetchCall("/api/v1/user", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,6 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const checkUserAction = ({ action }) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH +
|
||||
"/api/v1/user-action" +
|
||||
"?" +
|
||||
new URLSearchParams({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -7,7 +6,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const registerUserAction = ({ action }) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/user-action", {
|
||||
return SecurityClient.fetchCall("/api/v1/user-action", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const addUserToWorkspace = (email, workspaceId) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + workspaceId + "/invite-signup",
|
||||
"/api/v1/workspace/" + workspaceId + "/invite-signup",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const changeUserRoleInWorkspace = (membershipId, role) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/membership/" + membershipId + "/change-role",
|
||||
"/api/v1/membership/" + membershipId + "/change-role",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -7,7 +6,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const createWorkspace = (workspaceName, organizationId) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/workspace", {
|
||||
return SecurityClient.fetchCall("/api/v1/workspace", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -7,7 +6,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const deleteUserFromWorkspace = (membershipId) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/membership/" + membershipId, {
|
||||
return SecurityClient.fetchCall("/api/v1/membership/" + membershipId, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -7,7 +6,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const deleteWorkspace = (workspaceId) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/workspace/" + workspaceId, {
|
||||
return SecurityClient.fetchCall("/api/v1/workspace/" + workspaceId, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getLatestFileKey = (workspaceId) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/key/" + workspaceId + "/latest",
|
||||
"/api/v1/key/" + workspaceId + "/latest",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getWorkspaceInfo = (req, res) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + req.workspaceId,
|
||||
"/api/v1/workspace/" + req.workspaceId,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getWorkspaceKeys = (req, res) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + req.workspaceId + "/keys",
|
||||
"/api/v1/workspace/" + req.workspaceId + "/keys",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const getWorkspaceUsers = (req, res) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + req.workspaceId + "/users",
|
||||
"/api/v1/workspace/" + req.workspaceId + "/users",
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -8,7 +7,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const getWorkspaces = (req, res) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/workspace", {
|
||||
return SecurityClient.fetchCall("/api/v1/workspace", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
*/
|
||||
const renameWorkspace = (workspaceId, newWorkspaceName) => {
|
||||
return SecurityClient.fetchCall(
|
||||
PATH + "/api/v1/workspace/" + workspaceId + "/name",
|
||||
"/api/v1/workspace/" + workspaceId + "/name",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PATH } from "~/const";
|
||||
import SecurityClient from "~/utilities/SecurityClient";
|
||||
|
||||
/**
|
||||
@@ -10,7 +9,7 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @returns
|
||||
*/
|
||||
const uploadKeys = (workspaceId, userId, encryptedKey, nonce) => {
|
||||
return SecurityClient.fetchCall(PATH + "/api/v1/key/" + workspaceId, {
|
||||
return SecurityClient.fetchCall("/api/v1/key/" + workspaceId, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user