Skip to content

feat: DELETE /v1/scraper/jobs/delete/ — delete jobs by CIF or URL - #1115

Merged
sebiboga merged 1 commit into
masterfrom
feat/scraper-jobs-delete
Jul 26, 2026
Merged

feat: DELETE /v1/scraper/jobs/delete/ — delete jobs by CIF or URL#1115
sebiboga merged 1 commit into
masterfrom
feat/scraper-jobs-delete

Conversation

@sebiboga

Copy link
Copy Markdown
Member

Closes #1113

Adds DELETE /v1/scraper/jobs/delete/ endpoint for internal scraper use.

Features:

  • Accepts JSON body with cif (delete all company jobs) or url (delete single job)
  • Counts matching documents before deletion, returns 404 if nothing found
  • SolrEscape to prevent query injection
  • Full EN/RO documentation on API docs page

After merge: scraper can replace deleteJobsByCIF() and deleteJobByUrl() with API calls, eliminating all direct Solr access.

@sebiboga
sebiboga requested a review from ale23yfm July 26, 2026 10:14
@sebiboga
sebiboga force-pushed the feat/scraper-jobs-delete branch from bca9af3 to 99d2837 Compare July 26, 2026 10:18
…by CIF or URL

- Accepts JSON body: {"cif": "..."} or {"url": "..."}
- Validates exactly one param provided (both → 400)
- Rejects array body (→ 400), invalid CIF length (→ 400)
- Counts before delete, returns 404 if none found
- Returns {success, message, count} on success
- Full EN/RO docs on api/index.php
@sebiboga
sebiboga force-pushed the feat/scraper-jobs-delete branch from 99d2837 to cf326db Compare July 26, 2026 10:31
@sebiboga
sebiboga merged commit 5bb3865 into master Jul 26, 2026
1 check failed
@sebiboga
sebiboga deleted the feat/scraper-jobs-delete branch July 26, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: DELETE /v1/scraper/jobs/delete/ — delete jobs by CIF or URL

2 participants