Fixed minor issues + added language support
This commit is contained in:
@@ -88,6 +88,16 @@ public class ProjectController : ControllerBase {
|
||||
return Redirect($"http://{_options.Host}:{project.Port}/_/");
|
||||
}
|
||||
|
||||
[Authorized]
|
||||
[HttpGet("{projectId}/url/string")]
|
||||
public IActionResult GetProjectUrlHead(string projectId) {
|
||||
var project = _projects.GetProject(projectId);
|
||||
if (project == null) return NotFound();
|
||||
if (project.OwnerId != _context.UserId) return Unauthorized();
|
||||
if (_options.Enable) return Ok(new {url = $"https://{projectId}.{_options.Domain}/_/"});
|
||||
return Ok(new {url = $"http://{_options.Host}:{project.Port}/_/"});
|
||||
}
|
||||
|
||||
[Authorized]
|
||||
[HttpGet("{projectId}/start")]
|
||||
public async Task<IActionResult> StartProject(string projectId) {
|
||||
|
||||
Reference in New Issue
Block a user