Newer
Older
DTRAMServer / src / main / java / com / example / test / rest_controllers / OpenModelController.java
@Sakoda2269 Sakoda2269 on 17 Sep 2024 680 bytes first commit
package com.example.test.rest_controllers;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.example.test.services.ModelHandleService;

@RestController
@RequestMapping("/api")
public class OpenModelController {
	
	private final ModelHandleService modelService;
	
	OpenModelController(ModelHandleService oms){
		this.modelService = oms;
	}

	@PostMapping("/open_model")
	public void openModel(@RequestParam("path") String path) {
		modelService.openModel(path);
	}
	
	
}