You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Server: Add support for sharing notes via a link
This commit is contained in:
@@ -42,11 +42,15 @@ export default class Resource extends BaseItem {
|
||||
return imageMimeTypes.indexOf(type.toLowerCase()) >= 0;
|
||||
}
|
||||
|
||||
static fetchStatuses(resourceIds: string[]) {
|
||||
if (!resourceIds.length) return [];
|
||||
static fetchStatuses(resourceIds: string[]): Promise<any[]> {
|
||||
if (!resourceIds.length) return Promise.resolve([]);
|
||||
return this.db().selectAll(`SELECT resource_id, fetch_status FROM resource_local_states WHERE resource_id IN ("${resourceIds.join('","')}")`);
|
||||
}
|
||||
|
||||
public static sharedResourceIds(): Promise<string[]> {
|
||||
return this.db().selectAllFields('SELECT id FROM resources WHERE is_shared = 1', {}, 'id');
|
||||
}
|
||||
|
||||
static errorFetchStatuses() {
|
||||
return this.db().selectAll(`
|
||||
SELECT title AS resource_title, resource_id, fetch_error
|
||||
|
||||
Reference in New Issue
Block a user