mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: update services with publicRuntimeConfig
This commit is contained in:
parent
928ae775f4
commit
a718056b93
@ -1,11 +1,12 @@
|
|||||||
// services
|
// services
|
||||||
|
import getConfig from "next/config";
|
||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
import trackEventServices from "services/track-event.service";
|
import trackEventServices from "services/track-event.service";
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import { ICurrentUserResponse, IGptResponse } from "types";
|
import { ICurrentUserResponse, IGptResponse } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -9,7 +9,8 @@ import {
|
|||||||
ISaveAnalyticsFormData,
|
ISaveAnalyticsFormData,
|
||||||
} from "types";
|
} from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
class AnalyticsServices extends APIService {
|
class AnalyticsServices extends APIService {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
class AppInstallationsService extends APIService {
|
class AppInstallationsService extends APIService {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
import { ICurrentUserResponse } from "types";
|
import { ICurrentUserResponse } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
class AuthService extends APIService {
|
class AuthService extends APIService {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -5,7 +5,8 @@ import trackEventServices from "services/track-event.service";
|
|||||||
// types
|
// types
|
||||||
import type { CycleDateCheckData, ICurrentUserResponse, ICycle, IIssue } from "types";
|
import type { CycleDateCheckData, ICurrentUserResponse, ICycle, IIssue } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -4,7 +4,8 @@ import APIService from "services/api.service";
|
|||||||
import type { ICurrentUserResponse, IEstimate, IEstimateFormData } from "types";
|
import type { ICurrentUserResponse, IEstimate, IEstimateFormData } from "types";
|
||||||
import trackEventServices from "services/track-event.service";
|
import trackEventServices from "services/track-event.service";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
// services
|
// services
|
||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
interface UnSplashImage {
|
interface UnSplashImage {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
import trackEventServices from "services/track-event.service";
|
import trackEventServices from "services/track-event.service";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -3,7 +3,8 @@ import trackEventServices from "services/track-event.service";
|
|||||||
|
|
||||||
import { ICurrentUserResponse } from "types";
|
import { ICurrentUserResponse } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -3,7 +3,8 @@ import trackEventServices from "services/track-event.service";
|
|||||||
|
|
||||||
import { ICurrentUserResponse, IGithubRepoInfo, IGithubServiceImportFormData } from "types";
|
import { ICurrentUserResponse, IGithubRepoInfo, IGithubServiceImportFormData } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -10,7 +10,8 @@ import {
|
|||||||
IExportServiceResponse,
|
IExportServiceResponse,
|
||||||
} from "types";
|
} from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -4,7 +4,8 @@ import trackEventServices from "services/track-event.service";
|
|||||||
// types
|
// types
|
||||||
import { IJiraMetadata, IJiraResponse, IJiraImporterForm, ICurrentUserResponse } from "types";
|
import { IJiraMetadata, IJiraResponse, IJiraImporterForm, ICurrentUserResponse } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -12,7 +12,8 @@ import type {
|
|||||||
ISubIssueResponse,
|
ISubIssueResponse,
|
||||||
} from "types";
|
} from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -5,7 +5,8 @@ import trackEventServices from "./track-event.service";
|
|||||||
// types
|
// types
|
||||||
import type { IIssueViewOptions, IModule, IIssue, ICurrentUserResponse } from "types";
|
import type { IIssueViewOptions, IModule, IIssue, ICurrentUserResponse } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
// services
|
// services
|
||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import type {
|
import type {
|
||||||
|
@ -5,7 +5,8 @@ import trackEventServices from "services/track-event.service";
|
|||||||
// types
|
// types
|
||||||
import { IPage, IPageBlock, RecentPagesResponse, IIssue, ICurrentUserResponse } from "types";
|
import { IPage, IPageBlock, RecentPagesResponse, IIssue, ICurrentUserResponse } from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -5,7 +5,8 @@ import trackEventServices from "services/track-event.service";
|
|||||||
import { ICurrentUserResponse } from "types";
|
import { ICurrentUserResponse } from "types";
|
||||||
import { IProjectPublishSettings } from "store/project-publish";
|
import { IProjectPublishSettings } from "store/project-publish";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -16,7 +16,8 @@ import type {
|
|||||||
TProjectIssuesSearchParams,
|
TProjectIssuesSearchParams,
|
||||||
} from "types";
|
} from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -11,7 +11,8 @@ import type {
|
|||||||
IssueCommentReactionForm,
|
IssueCommentReactionForm,
|
||||||
} from "types";
|
} from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
import trackEventServices from "services/track-event.service";
|
import trackEventServices from "services/track-event.service";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -12,7 +12,8 @@ import type {
|
|||||||
IUserWorkspaceDashboard,
|
IUserWorkspaceDashboard,
|
||||||
} from "types";
|
} from "types";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -6,7 +6,8 @@ import { ICurrentUserResponse } from "types";
|
|||||||
// types
|
// types
|
||||||
import { IView } from "types/views";
|
import { IView } from "types/views";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
const trackEvent =
|
const trackEvent =
|
||||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
import APIService from "services/api.service";
|
import APIService from "services/api.service";
|
||||||
import trackEventServices from "services/track-event.service";
|
import trackEventServices from "services/track-event.service";
|
||||||
|
|
||||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
import getConfig from "next/config";
|
||||||
|
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import {
|
import {
|
||||||
|
Loading…
Reference in New Issue
Block a user