Files
ClassFeedback/node_modules/axios/lib/core/buildFullPath.js
chengzi 3b75170862 feat: 添加第12课课评、班级总结及学生画像更新
- K4周日1900班第12课《花朵随心画》课评(梁境城、钟嘉逸、王睿意补课)
- AICODE03/CSP03各班级第12课课评及班级总结
- 更新多班级学生画像
- 课评生成技能优化
2026-05-24 20:48:34 +08:00

23 lines
784 B
JavaScript

'use strict';
import isAbsoluteURL from '../helpers/isAbsoluteURL.js';
import combineURLs from '../helpers/combineURLs.js';
/**
* Creates a new URL by combining the baseURL with the requestedURL,
* only when the requestedURL is not already an absolute URL.
* If the requestURL is absolute, this function returns the requestedURL untouched.
*
* @param {string} baseURL The base URL
* @param {string} requestedURL Absolute or relative URL to combine
*
* @returns {string} The combined full path
*/
export default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
let isRelativeUrl = !isAbsoluteURL(requestedURL);
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
}