mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Add webpack-dev-server for development environment
This commit is contained in:
@@ -74,6 +74,8 @@ RUN npm i -D webpack-cli
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
|
||||
@@ -73,6 +73,7 @@ RUN npm i -D webpack-cli
|
||||
#Run the app
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
|
||||
@@ -1134,7 +1134,6 @@ export default class StatusPageAPI extends BaseAPI<
|
||||
) => {
|
||||
try {
|
||||
await this.subscribeToStatusPage(req);
|
||||
|
||||
return Response.sendEmptyResponse(req, res);
|
||||
} catch (err) {
|
||||
next(err);
|
||||
@@ -1957,6 +1956,11 @@ export default class StatusPageAPI extends BaseAPI<
|
||||
}
|
||||
|
||||
if (isUpdate) {
|
||||
|
||||
// check isUnsubscribed is set to false.
|
||||
|
||||
statusPageSubscriber.isUnsubscribed = req.body.data['isUnsubscribed'] ? true : false;
|
||||
|
||||
await StatusPageSubscriberService.updateOneById({
|
||||
id: statusPageSubscriber.id!,
|
||||
data: statusPageSubscriber,
|
||||
|
||||
@@ -141,7 +141,7 @@ export default class ModelAPI {
|
||||
? HTTPMethod.POST
|
||||
: HTTPMethod.PUT;
|
||||
|
||||
if (httpMethod === HTTPMethod.PUT) {
|
||||
if (httpMethod === HTTPMethod.PUT && !data.requestOptions?.overrideRequestUrl) {
|
||||
apiUrl = apiUrl.addRoute(`/${data.model._id}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ RUN npm i -D webpack-cli
|
||||
#Run the app
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
|
||||
@@ -73,6 +73,7 @@ RUN npm i -D webpack-cli
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
RUN mkdir /usr/src/app/dev-env
|
||||
RUN touch /usr/src/app/dev-env/.env
|
||||
RUN npm i -D webpack-dev-server
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
|
||||
@@ -43,12 +43,13 @@ const SubscribePage: FunctionComponent<SubscribePageProps> = (
|
||||
const updateApiUrl: URL = URL.fromString(
|
||||
URL.fromString(STATUS_PAGE_API_URL.toString())
|
||||
.addRoute(`/update-subscription/${statusPageId.toString()}`)
|
||||
.addRoute('/' + statusPageSubscriberId.toString())
|
||||
.toString()
|
||||
);
|
||||
|
||||
const getSubscriptionUrl: URL = URL.fromString(
|
||||
URL.fromString(STATUS_PAGE_API_URL.toString())
|
||||
.addRoute(`/get-subscription/${statusPageId.toString()}`)
|
||||
.addRoute(`/get-subscription/${statusPageId.toString()}`).addRoute('/' + statusPageSubscriberId.toString())
|
||||
.toString()
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user