1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

Server: Allow storing item content in database, filesystem or S3 (depending on config) (#5602)

This commit is contained in:
Laurent
2021-11-09 16:05:42 +00:00
committed by GitHub
parent 6b31609338
commit 485c0d0314
36 changed files with 5055 additions and 181 deletions

View File

@@ -360,18 +360,18 @@ describe('UserModel', function() {
const syncInfo3: any = JSON.parse(JSON.stringify(syncInfo1));
delete syncInfo3.ppk;
await models().item().saveForUser(user1.id, {
content: Buffer.from(JSON.stringify(syncInfo1)),
await models().item().saveFromRawContent(user1, {
body: Buffer.from(JSON.stringify(syncInfo1)),
name: 'info.json',
});
await models().item().saveForUser(user2.id, {
content: Buffer.from(JSON.stringify(syncInfo2)),
await models().item().saveFromRawContent(user2, {
body: Buffer.from(JSON.stringify(syncInfo2)),
name: 'info.json',
});
await models().item().saveForUser(user3.id, {
content: Buffer.from(JSON.stringify(syncInfo3)),
await models().item().saveFromRawContent(user3, {
body: Buffer.from(JSON.stringify(syncInfo3)),
name: 'info.json',
});