Skip to content

Commit 92d9a23

Browse files
committed
removed stuff no longer relevent
1 parent 6c1b798 commit 92d9a23

File tree

13 files changed

+78
-524
lines changed

13 files changed

+78
-524
lines changed

src/RandomAPI/APIServices/ServiceInterfaces/ICronScheduledTask.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/RandomAPI/APIServices/ServiceInterfaces/IHoursService.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/RandomAPI/APIServices/Services/CronTaskRunnerService.cs

Lines changed: 0 additions & 116 deletions
This file was deleted.

src/RandomAPI/APIServices/Services/TimeOutService.cs

Lines changed: 0 additions & 77 deletions
This file was deleted.

src/RandomAPI/Controllers/HealthController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace RandomAPI.Controllers
66
[Route("api/[controller]")]
77
public class APIHealthController : ControllerBase
88
{
9-
[HttpPost("calculate")]
9+
[HttpGet("calculate")]
1010
public IActionResult Health()
1111
{
1212
return Ok();
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
3+
namespace RandomAPI.Controllers
4+
{
5+
[ApiController]
6+
[Route("api/[controller]")]
7+
public class ResumeController : ControllerBase
8+
{
9+
private readonly string _resumePath;
10+
11+
public ResumeController(IWebHostEnvironment env)
12+
{
13+
_resumePath = Path.Combine(env.WebRootPath, "resumes");
14+
15+
if (!Directory.Exists(_resumePath))
16+
Directory.CreateDirectory(_resumePath);
17+
}
18+
19+
[HttpGet("latest")]
20+
public IActionResult GetLatestResume()
21+
{
22+
var directory = new DirectoryInfo(_resumePath);
23+
var latestFile = directory.GetFiles("*.pdf")
24+
.OrderByDescending(f => f.LastWriteTime)
25+
.FirstOrDefault();
26+
27+
if (latestFile == null)
28+
return NotFound("No resume versions found.");
29+
30+
return PhysicalFile(latestFile.FullName, "application/pdf", "Wyatt_Murray_Resume.pdf");
31+
}
32+
33+
[HttpPost("upload")]
34+
public async Task<IActionResult> UploadResume(IFormFile file)
35+
{
36+
if (file == null || file.Length == 0)
37+
return BadRequest("No file uploaded.");
38+
39+
// Format: resume_2026-03-10_1430.pdf
40+
var timestamp = DateTime.Now.ToString("yyyy-MM-dd_HHmm");
41+
var fileName = $"resume_{timestamp}{Path.GetExtension(file.FileName)}";
42+
var fullPath = Path.Combine(_resumePath, fileName);
43+
44+
using (var stream = new FileStream(fullPath, FileMode.Create))
45+
{
46+
await file.CopyToAsync(stream);
47+
}
48+
49+
return Ok(new { Message = "New version archived.", FileName = fileName });
50+
}
51+
}
52+
}

src/RandomAPI/Controllers/TimeOutController.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)