Spaces:
Sleeping
Sleeping
Commit
·
f629a02
1
Parent(s):
f402448
update: exercises
Browse files
src/lib/decorators/swagger-request.decorator.ts
CHANGED
@@ -3,12 +3,7 @@ import { getCallingFileName } from "@lib/utils/calling-file.helper";
|
|
3 |
|
4 |
const parseToSchema = (schema: any, joiSchema: any) => {
|
5 |
joiSchema = joiSchema.describe && joiSchema.describe().keys || joiSchema.keys || joiSchema;
|
6 |
-
|
7 |
-
try {
|
8 |
-
properties = Object.getOwnPropertyNames(joiSchema);
|
9 |
-
} catch (error) {
|
10 |
-
console.log(joiSchema)
|
11 |
-
}
|
12 |
properties.forEach((property) => {
|
13 |
const type = joiSchema[property].type;
|
14 |
if (type === "object") {
|
|
|
3 |
|
4 |
const parseToSchema = (schema: any, joiSchema: any) => {
|
5 |
joiSchema = joiSchema.describe && joiSchema.describe().keys || joiSchema.keys || joiSchema;
|
6 |
+
const properties = Object.getOwnPropertyNames(joiSchema);
|
|
|
|
|
|
|
|
|
|
|
7 |
properties.forEach((property) => {
|
8 |
const type = joiSchema[property].type;
|
9 |
if (type === "object") {
|
src/modules/users/modules/exercises/controllers/exercises.controller.ts
CHANGED
@@ -106,8 +106,6 @@ export class UsersExerciseController extends BaseController {
|
|
106 |
}
|
107 |
|
108 |
else {
|
109 |
-
console.log(req.query);
|
110 |
-
|
111 |
if (req.query.filter === "category") {
|
112 |
query = { category: { $regex: searchTerm, $options: "i" } };
|
113 |
}
|
|
|
106 |
}
|
107 |
|
108 |
else {
|
|
|
|
|
109 |
if (req.query.filter === "category") {
|
110 |
query = { category: { $regex: searchTerm, $options: "i" } };
|
111 |
}
|
test.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
const error = new Error();
|
2 |
-
const callerFile = error.stack?.split('\n')[3].trim().replace(/^at /, '');
|
3 |
-
const insidePerantheses = callerFile?.match(/\(([^)]+)\)/)?.[1];
|
4 |
-
const getOnlyfilePaths = insidePerantheses?.split(':')[0]
|
5 |
-
console.log(getOnlyfilePaths);
|
|
|
|
|
|
|
|
|
|
|
|