Skip to content

Commit 61b48b7

Browse files
Merge branch 'main' into improvement-404
2 parents 8bb4228 + e2b667a commit 61b48b7

34 files changed

Lines changed: 2217 additions & 1226 deletions

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Download sources
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020
- name: Get frontend build
2121
uses: actions/download-artifact@v8
2222
with:
2323
name: frontend-build
2424
path: frontend/build
2525
- name: Set up QEMU
26-
uses: docker/setup-qemu-action@v3
26+
uses: docker/setup-qemu-action@v4
2727
- name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@v3
28+
uses: docker/setup-buildx-action@v4
2929
- name: Login to Docker Hub
3030
uses: docker/login-action@v3
3131
with:
3232
username: benel
3333
password: ${{ secrets.DOCKERHUB_TOKEN }}
3434
- name: Build and push
35-
uses: docker/build-push-action@v6
35+
uses: docker/build-push-action@v7
3636
with:
3737
context: . #No checkout
3838
push: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function(doc, req) {
2+
if (!doc) return [null, { json: { error: 'not_found' } }];
3+
const body = JSON.parse(req.body);
4+
if (body.beingEditedBy) {
5+
doc.beingEditedBy = body.beingEditedBy;
6+
} else {
7+
delete doc.beingEditedBy;
8+
}
9+
return [doc, { json: { status: 'ok' } }];
10+
}
11+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
function (doc) {
22
const { getRelatedDocuments, emitPassages, emitIncludedDocuments } = require('views/lib/links');
33

4-
let { _id, text = '', isPartOf = _id, links = [] } = doc;
4+
let { _id, text = '', isPartOf = _id, links = [], beingEditedBy } = doc;
55
let related = getRelatedDocuments({isPartOf, links});
66

7-
emitPassages({text, isPartOf, related});
7+
emitPassages({text, isPartOf, related, beingEditedBy});
88
emitIncludedDocuments({isPartOf, links});
99
}

backend/hyperglosae/src/views/lib/links.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,17 @@ const parseText = (text) => {
3131
}));
3232
}
3333

34-
exports.emitPassages = ({text, isPartOf, related}) => {
34+
exports.emitPassages = ({text, isPartOf, related, beingEditedBy}) => {
3535
parseText(text).forEach(({rubric, passage, parsed_rubric}) =>
3636
related.forEach((x) => {
37-
emit([x, ...parsed_rubric], { text: passage, isPartOf, rubric, _id: null });
38-
})
37+
emit([x, ...parsed_rubric], {
38+
text: passage,
39+
isPartOf,
40+
rubric,
41+
_id: null,
42+
...(beingEditedBy && {beingEditedBy})
43+
});
44+
})
3945
);
4046
}
4147

docs/#1architecture.png

101 KB
Loading

0 commit comments

Comments
 (0)