max: {
major: 1,
minor: 0,
- patch: 3,
+ patch: 4,
},
};
}
- topicGetByUrl(dbCtx, topicUrl) {
+ topicGetByUrl(dbCtx, topicUrl, applyDefaults = true) {
const _scope = _fileScope('topicGetByUrl');
this.logger.debug(_scope, 'called', { topicUrl });
try {
topic = this.statement.topicGetByUrl.get({ topicUrl });
DatabaseSQLite._topicDataToNative(topic);
- return this._topicDefaults(topic);
+ if (applyDefaults) {
+ topic = this._topicDefaults(topic);
+ }
+ return topic;
} catch (e) {
this.logger.error(_scope, 'failed', { error: e, topic, topicUrl });
throw e;
const _scope = _fileScope('topicSetContent');
const topicSetContentData = {
contentType: null,
+ httpETag: null,
+ httpLastModified: null,
...data,
};
const logData = {
if (result.changes != 1) {
throw new DBErrors.UnexpectedResult('did not set topic content');
}
- result = this.statement.topicSetContentHistory.run({ topicId: data.topicId, contentHash: data.contentHash, contentSize: data.content.length });
+ result = this.statement.topicSetContentHistory.run({
+ topicId: data.topicId,
+ contentHash: data.contentHash,
+ contentSize: data.content.length,
+ });
if (result.changes != 1) {
throw new DBErrors.UnexpectedResult('did not set topic content history');
}