Skip to content

Commit

Permalink
add stripe
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartek-Figat committed Oct 16, 2023
1 parent 3675c66 commit fce991b
Show file tree
Hide file tree
Showing 20 changed files with 502 additions and 91 deletions.
34 changes: 17 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
version: "3.8"

services:
prometheus:
image: prom/prometheus
ports:
- 9090:9090
volumes:
- ./prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
# prometheus:
# image: prom/prometheus
# ports:
# - 9090:9090
# volumes:
# - ./prometheus:/etc/prometheus
# command:
# - '--config.file=/etc/prometheus/prometheus.yml'

grafana:
image: grafana/grafana
container_name: grafana
restart: unless-stopped
ports:
- 3000:3000
volumes:
- ./grafana:/var/lib/grafana
# grafana:
# image: grafana/grafana
# container_name: grafana
# restart: unless-stopped
# ports:
# - 3000:3000
# volumes:
# - ./grafana:/var/lib/grafana

backend:
container_name: backend
Expand Down Expand Up @@ -45,7 +45,7 @@ services:
networks:
- app-network
ports:
- "3001:3001"
- "3000:3000"
depends_on:
- backend
environment:
Expand Down
75 changes: 65 additions & 10 deletions packages/backEnd/build/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { AuthController } from './../src/auth/authController';
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
import { ProfileController } from './../src/editProfile/profileController';
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
import { SubscriptionController } from './../src/stripeSubscription/subscriptionController';
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
import { UserController } from './../src/user/userController';
import { expressAuthentication } from './../src/authentication/authentication';
// @ts-ignore - no great way to install types from subpackage
Expand Down Expand Up @@ -80,7 +82,7 @@ export function RegisterRoutes(app: Router) {
// NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look
// Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa
// ###########################################################################################################
app.get('/api/v1',
app.get('/api/v1/categories',
...(fetchMiddlewares<RequestHandler>(CategoriesController)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.getAllCategories)),

Expand All @@ -104,7 +106,8 @@ export function RegisterRoutes(app: Router) {
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/api/v1/:id',
app.get('/api/v1/categories/:id',
authenticateMiddleware([{"jwt":[]}]),
...(fetchMiddlewares<RequestHandler>(CategoriesController)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.getAd)),

Expand All @@ -129,11 +132,11 @@ export function RegisterRoutes(app: Router) {
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/api/v1/filter',
app.get('/api/v1/categories/filter',
...(fetchMiddlewares<RequestHandler>(CategoriesController)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.getFilteredAds)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.filterCategories)),

function CategoriesController_getFilteredAds(request: any, response: any, next: any) {
function CategoriesController_filterCategories(request: any, response: any, next: any) {
const args = {
request: {"in":"request","name":"request","required":true,"dataType":"object"},
};
Expand All @@ -147,18 +150,19 @@ export function RegisterRoutes(app: Router) {
const controller = new CategoriesController();


const promise = controller.getFilteredAds.apply(controller, validatedArgs as any);
const promise = controller.filterCategories.apply(controller, validatedArgs as any);
promiseHandler(controller, promise, response, 200, next);
} catch (err) {
return next(err);
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.post('/api/v1/create-category',
app.post('/api/v1/categories/create-category',
authenticateMiddleware([{"jwt":[]}]),
...(fetchMiddlewares<RequestHandler>(CategoriesController)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.putAd)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.createCategory)),

function CategoriesController_putAd(request: any, response: any, next: any) {
function CategoriesController_createCategory(request: any, response: any, next: any) {
const args = {
request: {"in":"request","name":"request","required":true,"dataType":"object"},
};
Expand All @@ -172,14 +176,15 @@ export function RegisterRoutes(app: Router) {
const controller = new CategoriesController();


const promise = controller.putAd.apply(controller, validatedArgs as any);
const promise = controller.createCategory.apply(controller, validatedArgs as any);
promiseHandler(controller, promise, response, 201, next);
} catch (err) {
return next(err);
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.put('/api/v1/:id',
authenticateMiddleware([{"jwt":[]}]),
...(fetchMiddlewares<RequestHandler>(CategoriesController)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.updateCategory)),

Expand All @@ -206,6 +211,7 @@ export function RegisterRoutes(app: Router) {
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.delete('/api/v1/:id',
authenticateMiddleware([{"jwt":[]}]),
...(fetchMiddlewares<RequestHandler>(CategoriesController)),
...(fetchMiddlewares<RequestHandler>(CategoriesController.prototype.deleteCategory)),

Expand Down Expand Up @@ -330,6 +336,55 @@ export function RegisterRoutes(app: Router) {
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/api/v1/subscription/conf',
...(fetchMiddlewares<RequestHandler>(SubscriptionController)),
...(fetchMiddlewares<RequestHandler>(SubscriptionController.prototype.conf)),

function SubscriptionController_conf(request: any, response: any, next: any) {
const args = {
};

// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa

let validatedArgs: any[] = [];
try {
validatedArgs = getValidatedArgs(args, request, response);

const controller = new SubscriptionController();


const promise = controller.conf.apply(controller, validatedArgs as any);
promiseHandler(controller, promise, response, 200, next);
} catch (err) {
return next(err);
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.post('/api/v1/subscription/create-checkout-session',
...(fetchMiddlewares<RequestHandler>(SubscriptionController)),
...(fetchMiddlewares<RequestHandler>(SubscriptionController.prototype.createSubscriptionSession)),

function SubscriptionController_createSubscriptionSession(request: any, response: any, next: any) {
const args = {
requestBody: {"in":"body","name":"requestBody","required":true,"dataType":"any"},
};

// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa

let validatedArgs: any[] = [];
try {
validatedArgs = getValidatedArgs(args, request, response);

const controller = new SubscriptionController();


const promise = controller.createSubscriptionSession.apply(controller, validatedArgs as any);
promiseHandler(controller, promise, response, undefined, next);
} catch (err) {
return next(err);
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/profile/user',
authenticateMiddleware([{"jwt":[]}]),
...(fetchMiddlewares<RequestHandler>(UserController)),
Expand Down
Loading

0 comments on commit fce991b

Please sign in to comment.