job-pro 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mihoyo.js +4 -1
- package/dist/oppo.js +5 -1
- package/dist/sf.js +4 -3
- package/package.json +1 -1
package/dist/mihoyo.js
CHANGED
|
@@ -167,7 +167,10 @@ export async function fetchPositionDetail(postId) {
|
|
|
167
167
|
const id = (postId ?? "").trim();
|
|
168
168
|
if (!id)
|
|
169
169
|
return { ok: false, source: SOURCE, message: "post_id is required" };
|
|
170
|
-
|
|
170
|
+
// /v1/job/info requires channelDetailIds (the channel mhy splits social /
|
|
171
|
+
// campus / intern positions on); without it the API returns "职位渠道不可
|
|
172
|
+
// 以为空" even for a valid post id.
|
|
173
|
+
const response = await postJson("/v1/job/info", { id, channelDetailIds: CHANNEL_DETAIL_IDS });
|
|
171
174
|
if (!response.ok || !response.data) {
|
|
172
175
|
return { ok: false, source: SOURCE, message: response.message, post_id: id };
|
|
173
176
|
}
|
package/dist/oppo.js
CHANGED
|
@@ -166,8 +166,12 @@ export async function fetchPositionDetail(postId) {
|
|
|
166
166
|
const id = (postId ?? "").trim();
|
|
167
167
|
if (!id)
|
|
168
168
|
return { ok: false, source: SOURCE, message: "post_id is required", post_id: id };
|
|
169
|
+
// The endpoint expects `id`, not `idRecruitPosition` — passing
|
|
170
|
+
// `idRecruitPosition` returns the puzzling "id不能为空" error even when the
|
|
171
|
+
// value is present. The response body still keys the id back as
|
|
172
|
+
// `idRecruitPosition`, which is what tripped this in the first place.
|
|
169
173
|
const r = await call("GET", "/openapi/position/detail", {
|
|
170
|
-
query: {
|
|
174
|
+
query: { id },
|
|
171
175
|
});
|
|
172
176
|
if (!r.ok || !r.data) {
|
|
173
177
|
return { ok: false, source: SOURCE, message: r.message || "no detail returned", post_id: id };
|
package/dist/sf.js
CHANGED
|
@@ -165,9 +165,10 @@ export async function fetchPositionDetail(postId) {
|
|
|
165
165
|
const id = (postId ?? "").trim();
|
|
166
166
|
if (!id)
|
|
167
167
|
return { ok: false, source: SOURCE, message: "post_id is required", post_id: id };
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
|
|
168
|
+
// /api/position/findById/ is the auth-gated internal route; /api/web/position/
|
|
169
|
+
// is the public anon route the SPA actually uses (sibling of /api/web/position/
|
|
170
|
+
// query for search). Without the /web/ prefix this 401s.
|
|
171
|
+
const url = `${API_ROOT}/api/web/position/findById/${encodeURIComponent(id)}`;
|
|
171
172
|
let response;
|
|
172
173
|
try {
|
|
173
174
|
response = await fetch(url, { method: "GET", headers: DEFAULT_HEADERS });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "job-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "Query Chinese big-tech campus recruiting from your terminal. 50 companies, all 50 live. 46 via each company's own API; the 4 with no public canonical feed (Hikvision, CICC, Cainiao, WeBank) surfaced via Liepin as a clearly-labeled third-party fallback. No signup, no token, no server.",
|
|
5
5
|
"homepage": "https://job.ha7ch.com",
|
|
6
6
|
"repository": "https://github.com/HA7CH/job-pro",
|