fixed web error adding di computed repository
This commit is contained in:
parent
18f2dbb240
commit
f59bb9d801
4 changed files with 14 additions and 4 deletions
|
@ -5,6 +5,7 @@ import { AssemblyController } from "../../features/assembly_create/assembly_crea
|
|||
import { AssemblyPreviewsController } from "../../features/assembly_previews/assembly_previews_controller";
|
||||
import { EntityRepository } from "../repository/entity_repository";
|
||||
import { ZipRepository } from "../repository/zip_repository";
|
||||
import { ComputeRepository } from "../repository/compute_repository";
|
||||
|
||||
|
||||
export const locator = (env: Env) => {
|
||||
|
@ -16,7 +17,8 @@ export const locator = (env: Env) => {
|
|||
const registerRepository = (env:Env) => {
|
||||
|
||||
override(ZipRepository, ZipRepository);
|
||||
override(EntityRepository, EntityRepository)
|
||||
override(EntityRepository, EntityRepository);
|
||||
override(ComputeRepository,ComputeRepository);
|
||||
|
||||
}
|
||||
const registerController = (env: Env) => {
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
import { reflection } from 'first-di';
|
||||
import "reflect-metadata";
|
||||
|
||||
|
||||
@reflection
|
||||
export class ComputeRepository {
|
||||
public computedAdjaxedMatrix = () => {};
|
||||
public computedAdjaxedMatrix = () => {
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@ export class AssemblyController {
|
|||
) => {
|
||||
const file = req.files;
|
||||
const f = file["freecad"] as IFile;
|
||||
this.entityRepository.saveRootEntity(f.data, f.name);
|
||||
console.log(f)
|
||||
// this.entityRepository.saveRootEntity(f.data, f.name);
|
||||
|
||||
res.status(200).json("ok");
|
||||
return;
|
||||
|
|
|
@ -25,7 +25,7 @@ const UploadButton = () => {
|
|||
const uploadFile = async (file: File) => {
|
||||
if (file) {
|
||||
const formData = new FormData();
|
||||
formData.append("image", file, file.name);
|
||||
formData.append("freecad ", file, file.name);
|
||||
setLoading(true);
|
||||
await HttpRepository.request(
|
||||
HttpMethod.POST,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue