Release v2.5.6

This commit is contained in:
2026-08-05 19:38:16 +01:00
parent a8ef35b287
commit 9f831f04bc
161 changed files with 8487 additions and 1295 deletions
@@ -0,0 +1,31 @@
// API source duplication helpers.
function buildDuplicateApiSourceName(sourceName) {
const baseName = 'Copy of ' + String(sourceName || '').trim();
return baseName;
}
function buildDuplicateApiSource(apiSource, duplicateName) {
return Object.assign({}, apiSource, {
id: null,
name: duplicateName,
apiUrl: apiSource.api_url || '',
lastPulledAt: null,
lastPullError: '',
lastResponseStatus: null,
lastResponseContentType: '',
lastResponseJson: '',
authMethod: apiSource.auth_method || 'none',
authUsername: apiSource.auth_username || '',
authPassword: apiSource.auth_password || '',
authBearerToken: apiSource.auth_bearer_token || '',
authHeaderName: apiSource.auth_header_name || 'X-API-Key',
authHeaderValue: apiSource.auth_header_value || '',
itemsPath: apiSource.items_path || ''
});
}
module.exports = {
buildDuplicateApiSourceName,
buildDuplicateApiSource
};