mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 08:36:25 +00:00
fix(jobnet-search): emit the /scrape contract fields in search output (#339)
Adds additive normalization so jobnet search output carries the cross-portal contract fields (company, location, date, deadline with the 1900-01-01 NotDisclosed sentinel mapped to null, and url). Emits the public /find-job/{jobAdId} route and corrects the skill's own stale /job/ documentation, which redirects anonymous visitors into the MitID login flow.
Co-authored-by: oscarbol09 <80536682+oscarbol09@users.noreply.github.com>
This commit is contained in:
@@ -100,6 +100,13 @@ export function createSearchOutput(data: SearchApiResponse, flags: SearchFlags)
|
||||
workPlaceAddress: job.workPlaceAddress ?? "",
|
||||
isSeen: job.isSeen,
|
||||
isFavorite: job.isFavorite,
|
||||
company: job.hiringOrgName,
|
||||
location: job.postalDistrictName ?? job.municipality ?? null,
|
||||
date: job.publicationDate.slice(0, 10),
|
||||
deadline: job.applicationDeadline && !job.applicationDeadline.startsWith("1900-01-01")
|
||||
? job.applicationDeadline.slice(0, 10)
|
||||
: null,
|
||||
url: `https://jobnet.dk/find-job/${job.jobAdId}`,
|
||||
}))
|
||||
|
||||
if (flags.limit !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user