Archived
Private
Public Access
1
0

Fixed minor issues + added language support

This commit is contained in:
2023-03-25 18:36:19 +01:00
parent 4422d8818a
commit 6dfb5a4b48
23 changed files with 334 additions and 83 deletions

View File

@@ -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) {