Update CodeExamplesPath in Pagination and Model files

This commit is contained in:
Simon Larsen 2023-12-28 21:36:59 +00:00
parent 1462d8d6bc
commit dc970eda5e
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
3 changed files with 27 additions and 27 deletions

View File

@ -2,7 +2,7 @@ import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import LocalFile from 'CommonServer/Utils/LocalFile';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ViewsPath } from '../Utils/Config';
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
@ -18,7 +18,7 @@ export default class ServiceHandler {
'select',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/Select.md'
`${CodeExamplesPath}/DataTypes/Select.md`
);
}
);
@ -28,7 +28,7 @@ export default class ServiceHandler {
'sort',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/Sort.md'
`${CodeExamplesPath}/DataTypes/Sort.md`
);
}
);
@ -38,7 +38,7 @@ export default class ServiceHandler {
'equal-to',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/EqualTo.md'
`${CodeExamplesPath}/DataTypes/EqualTo.md`
);
}
);
@ -48,7 +48,7 @@ export default class ServiceHandler {
'equal-to-or-null',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/EqualToOrNull.md'
`${CodeExamplesPath}/DataTypes/EqualToOrNull.md`
);
}
);
@ -58,7 +58,7 @@ export default class ServiceHandler {
'greater-than',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/GreaterThan.md'
`${CodeExamplesPath}/DataTypes/GreaterThan.md`
);
}
);
@ -68,7 +68,7 @@ export default class ServiceHandler {
'greater-than-or-equal',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/GreaterThanOrEqual.md'
`${CodeExamplesPath}/DataTypes/GreaterThanOrEqual.md`
);
}
);
@ -78,7 +78,7 @@ export default class ServiceHandler {
'less-than',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/LessThan.md'
`${CodeExamplesPath}/DataTypes/LessThan.md`
);
}
);
@ -88,7 +88,7 @@ export default class ServiceHandler {
'less-than-or-equal',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/LessThanOrEqual.md'
`${CodeExamplesPath}/DataTypes/LessThanOrEqual.md`
);
}
);
@ -98,7 +98,7 @@ export default class ServiceHandler {
'is-null',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/IsNull.md'
`${CodeExamplesPath}/DataTypes/IsNull.md`
);
}
);
@ -108,7 +108,7 @@ export default class ServiceHandler {
'not-null',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/NotNull.md'
`${CodeExamplesPath}/DataTypes/NotNull.md`
);
}
);
@ -118,7 +118,7 @@ export default class ServiceHandler {
'not-equals',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/DataTypes/NotEqualTo.md'
`${CodeExamplesPath}/DataTypes/NotEqualTo.md`
);
}
);

View File

@ -109,7 +109,7 @@ export default class ServiceHandler {
'list-request',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/ListRequest.md`
`${CodeExamplesPath}/Model/ListRequest.md`
);
}
);
@ -119,7 +119,7 @@ export default class ServiceHandler {
'item-request',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/ItemRequest.md`
`${CodeExamplesPath}/Model/ItemRequest.md`
);
}
);
@ -129,7 +129,7 @@ export default class ServiceHandler {
'item-response',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/ItemResponse.md`
`${CodeExamplesPath}/Model/ItemResponse.md`
);
}
);
@ -139,7 +139,7 @@ export default class ServiceHandler {
'count-request',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/CountRequest.md`
`${CodeExamplesPath}/Model/CountRequest.md`
);
}
);
@ -149,7 +149,7 @@ export default class ServiceHandler {
'count-response',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/CountResponse.md`
`${CodeExamplesPath}/Model/CountResponse.md`
);
}
);
@ -159,7 +159,7 @@ export default class ServiceHandler {
'update-request',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/UpdateRequest.md`
`${CodeExamplesPath}/Model/UpdateRequest.md`
);
}
);
@ -169,7 +169,7 @@ export default class ServiceHandler {
'update-response',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/UpdateResponse.md`
`${CodeExamplesPath}/Model/UpdateResponse.md`
);
}
);
@ -179,7 +179,7 @@ export default class ServiceHandler {
'create-request',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/CreateRequest.md`
`${CodeExamplesPath}/Model/CreateRequest.md`
);
}
);
@ -189,7 +189,7 @@ export default class ServiceHandler {
'create-response',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/CreateResponse.md`
`${CodeExamplesPath}/Model/CreateResponse.md`
);
}
);
@ -199,7 +199,7 @@ export default class ServiceHandler {
'delete-request',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/DeleteRequest.md`
`${CodeExamplesPath}/Model/DeleteRequest.md`
);
}
);
@ -209,7 +209,7 @@ export default class ServiceHandler {
'delete-response',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/DeleteResponse.md`
`${CodeExamplesPath}/Model/DeleteResponse.md`
);
}
);
@ -219,7 +219,7 @@ export default class ServiceHandler {
'list-response',
async () => {
return await LocalFile.read(
`${CodeExamplesPath}CodeExamples/Model/ListResponse.md`
`${CodeExamplesPath}/Model/ListResponse.md`
);
}
);

View File

@ -2,7 +2,7 @@ import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import LocalFile from 'CommonServer/Utils/LocalFile';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import { ViewsPath } from '../Utils/Config';
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
@ -24,7 +24,7 @@ export default class ServiceHandler {
'response',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/Pagination/Response.md'
`${CodeExamplesPath}/Pagination/Response.md`
);
}
);
@ -34,7 +34,7 @@ export default class ServiceHandler {
'request',
async () => {
return await LocalFile.read(
'/usr/src/app/CodeExamples/Pagination/Request.md'
`${CodeExamplesPath}/Pagination/Request.md`
);
}
);