mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Chore/Remove Previous Subscription (#5282)
Remove cancel subscription functionality from account controller and UI components; update email background and logo URLs across multiple email templates.
This commit is contained in:
@@ -2,7 +2,6 @@ import { Request, Response, NextFunction } from 'express'
|
||||
import { StatusCodes } from 'http-status-codes'
|
||||
import { AccountService } from '../services/account.service'
|
||||
import { getRunningExpressApp } from '../../utils/getRunningExpressApp'
|
||||
import axios from 'axios'
|
||||
|
||||
export class AccountController {
|
||||
public async register(req: Request, res: Response, next: NextFunction) {
|
||||
@@ -84,30 +83,6 @@ export class AccountController {
|
||||
}
|
||||
}
|
||||
|
||||
public async cancelPreviousCloudSubscrption(req: Request, res: Response, next: NextFunction) {
|
||||
try {
|
||||
const { email } = req.body
|
||||
if (!email) {
|
||||
return res.status(StatusCodes.BAD_REQUEST).json({ message: 'Email is required' })
|
||||
}
|
||||
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
Accept: 'application/json'
|
||||
}
|
||||
|
||||
const response = await axios.post(`${process.env.ENGINE_URL}/cancel-subscription`, { email }, { headers })
|
||||
|
||||
if (response.status === 200) {
|
||||
return res.status(StatusCodes.OK).json(response.data)
|
||||
} else {
|
||||
return res.status(response.status).json(response.data)
|
||||
}
|
||||
} catch (error) {
|
||||
next(error)
|
||||
}
|
||||
}
|
||||
|
||||
public async logout(req: Request, res: Response, next: NextFunction) {
|
||||
try {
|
||||
if (req.user) {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
style='
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -220,7 +220,7 @@
|
||||
<img
|
||||
alt=''
|
||||
width='auto'
|
||||
src='https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png'
|
||||
src='https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png'
|
||||
style='
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
style="
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -338,7 +338,7 @@
|
||||
<img
|
||||
alt=""
|
||||
width="auto"
|
||||
src="https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png"
|
||||
src="https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png"
|
||||
style="
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
style='
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -219,7 +219,7 @@
|
||||
<img
|
||||
alt=''
|
||||
width='auto'
|
||||
src='https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png'
|
||||
src='https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png'
|
||||
style='
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
style="
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -338,7 +338,7 @@
|
||||
<img
|
||||
alt=""
|
||||
width="auto"
|
||||
src="https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png"
|
||||
src="https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png"
|
||||
style="
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
style='
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -219,7 +219,7 @@
|
||||
<img
|
||||
alt=''
|
||||
width='auto'
|
||||
src='https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png'
|
||||
src='https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png'
|
||||
style='
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
style="
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -338,7 +338,7 @@
|
||||
<img
|
||||
alt=""
|
||||
width="auto"
|
||||
src="https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png"
|
||||
src="https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png"
|
||||
style="
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
bgcolor='#000000'
|
||||
>
|
||||
<div
|
||||
style='position: relative;background-color: #151719 !important;background-image:url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);background-position:center top;background-size:contain;background-repeat:no-repeat;'
|
||||
style='position: relative;background-color: #151719 !important;background-image:url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);background-position:center top;background-size:contain;background-repeat:no-repeat;'
|
||||
>
|
||||
|
||||
<div id='illustration' className='relative max-w-6xl mx-auto h-0 pointer-events-none' aria-hidden='true'>
|
||||
@@ -170,7 +170,7 @@
|
||||
<img
|
||||
alt=''
|
||||
width='auto'
|
||||
src='https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png'
|
||||
src='https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png'
|
||||
style='display: block; outline: none; text-decoration: none; height: 40px; font-size: 13px; line-height: 100%; -ms-interpolation-mode: bicubic; border: 0;'
|
||||
/>
|
||||
</td>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
style="
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -338,7 +338,7 @@
|
||||
<img
|
||||
alt=""
|
||||
width="auto"
|
||||
src="https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png"
|
||||
src="https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png"
|
||||
style="
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
style='
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -219,7 +219,7 @@
|
||||
<img
|
||||
alt=''
|
||||
width='auto'
|
||||
src='https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png'
|
||||
src='https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png'
|
||||
style='
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
style="
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -338,7 +338,7 @@
|
||||
<img
|
||||
alt=""
|
||||
width="auto"
|
||||
src="https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png"
|
||||
src="https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png"
|
||||
style="
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
style='
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -219,7 +219,7 @@
|
||||
<img
|
||||
alt=''
|
||||
width='auto'
|
||||
src='https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png'
|
||||
src='https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png'
|
||||
style='
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
style="
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -338,7 +338,7 @@
|
||||
<img
|
||||
alt=""
|
||||
width="auto"
|
||||
src="https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png"
|
||||
src="https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png"
|
||||
style="
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
bgcolor='#000000'
|
||||
>
|
||||
<div
|
||||
style='position: relative;background-color: #151719 !important;background-image:url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);background-position:center top;background-size:contain;background-repeat:no-repeat;'
|
||||
style='position: relative;background-color: #151719 !important;background-image:url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);background-position:center top;background-size:contain;background-repeat:no-repeat;'
|
||||
>
|
||||
|
||||
<div id='illustration' className='relative max-w-6xl mx-auto h-0 pointer-events-none' aria-hidden='true'>
|
||||
@@ -170,7 +170,7 @@
|
||||
<img
|
||||
alt=''
|
||||
width='auto'
|
||||
src='https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png'
|
||||
src='https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png'
|
||||
style='display: block; outline: none; text-decoration: none; height: 40px; font-size: 13px; line-height: 100%; -ms-interpolation-mode: bicubic; border: 0;'
|
||||
/>
|
||||
</td>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
style="
|
||||
position: relative;
|
||||
background-color: #151719 !important;
|
||||
background-image: url(https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_email_bg.svg);
|
||||
background-image: url(https://general-flowise.s3.us-east-1.amazonaws.com/flowise_email_bg.svg);
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
@@ -338,7 +338,7 @@
|
||||
<img
|
||||
alt=""
|
||||
width="auto"
|
||||
src="https://auth.flowiseai.com/storage/v1/object/public/flowise-static-assets/flowise_logo.png"
|
||||
src="https://general-flowise.s3.us-east-1.amazonaws.com/Flowise+Logo+Cropped+White+High+Res.png"
|
||||
style="
|
||||
display: block;
|
||||
outline: none;
|
||||
|
||||
@@ -28,8 +28,6 @@ router.post('/forgot-password', accountController.forgotPassword)
|
||||
|
||||
router.post('/reset-password', accountController.resetPassword)
|
||||
|
||||
router.post('/cancel-subscription', accountController.cancelPreviousCloudSubscrption)
|
||||
|
||||
router.post('/billing', accountController.createStripeCustomerPortalSession)
|
||||
|
||||
router.get('/basic-auth', accountController.getBasicAuth)
|
||||
|
||||
Reference in New Issue
Block a user