Feature: Remove message, Upgrade: pull better job data, add dedicated status section to job applications
This commit is contained in:
@@ -67,5 +67,17 @@ namespace JobTrackerApi.Controllers
|
||||
|
||||
return CreatedAtAction(nameof(GetForJob), new { jobId = message.JobApplicationId }, message);
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{id:int}")]
|
||||
public async Task<IActionResult> Delete([FromRoute] int id, CancellationToken cancellationToken)
|
||||
{
|
||||
var message = await _db.Correspondences.FirstOrDefaultAsync(c => c.Id == id, cancellationToken);
|
||||
if (message is null) return NotFound();
|
||||
|
||||
_db.Correspondences.Remove(message);
|
||||
await _db.SaveChangesAsync(cancellationToken);
|
||||
return NoContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,7 +576,7 @@ namespace JobTrackerApi.Controllers
|
||||
// Generate and persist a short summary at creation time to avoid repeated model calls.
|
||||
try
|
||||
{
|
||||
var shortSum = await _summarizer.SummarizeAsync(job.Description ?? job.Notes ?? "", 80, 20);
|
||||
var shortSum = await _summarizer.SummarizeAsync(job.Description ?? job.Notes ?? "", 160, 60);
|
||||
job.ShortSummary = shortSum;
|
||||
}
|
||||
catch
|
||||
@@ -626,7 +626,8 @@ namespace JobTrackerApi.Controllers
|
||||
string? CoverLetterText,
|
||||
string? JobUrl,
|
||||
DateTime? DateApplied,
|
||||
DateTime? FeedbackRequestedAt
|
||||
DateTime? FeedbackRequestedAt,
|
||||
DateTime? StatusChangedAt
|
||||
);
|
||||
|
||||
[HttpPut("{id:int}")]
|
||||
@@ -686,7 +687,7 @@ namespace JobTrackerApi.Controllers
|
||||
Type = "StatusChanged",
|
||||
OldValue = oldStatus,
|
||||
NewValue = job.Status,
|
||||
At = DateTime.Now
|
||||
At = request.StatusChangedAt ?? DateTime.Now
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user