forked from mirror/misskey
Use camelCase instead of snake_case
This commit is contained in:
parent
162ace2fd6
commit
8ba87443ca
@ -117,11 +117,11 @@ export default Vue.extend({
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.connection = (this as any).os.stream.useSharedConnection('drive');
|
this.connection = (this as any).os.stream.useSharedConnection('drive');
|
||||||
|
|
||||||
this.connection.on('file_created', this.onStreamDriveFileCreated);
|
this.connection.on('fileCreated', this.onStreamDriveFileCreated);
|
||||||
this.connection.on('file_updated', this.onStreamDriveFileUpdated);
|
this.connection.on('fileUpdated', this.onStreamDriveFileUpdated);
|
||||||
this.connection.on('file_deleted', this.onStreamDriveFileDeleted);
|
this.connection.on('fileDeleted', this.onStreamDriveFileDeleted);
|
||||||
this.connection.on('folder_created', this.onStreamDriveFolderCreated);
|
this.connection.on('folderCreated', this.onStreamDriveFolderCreated);
|
||||||
this.connection.on('folder_updated', this.onStreamDriveFolderUpdated);
|
this.connection.on('folderUpdated', this.onStreamDriveFolderUpdated);
|
||||||
|
|
||||||
if (this.initFolder) {
|
if (this.initFolder) {
|
||||||
this.move(this.initFolder);
|
this.move(this.initFolder);
|
||||||
|
@ -103,11 +103,11 @@ export default Vue.extend({
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.connection = (this as any).os.stream.useSharedConnection('drive');
|
this.connection = (this as any).os.stream.useSharedConnection('drive');
|
||||||
|
|
||||||
this.connection.on('file_created', this.onStreamDriveFileCreated);
|
this.connection.on('fileCreated', this.onStreamDriveFileCreated);
|
||||||
this.connection.on('file_updated', this.onStreamDriveFileUpdated);
|
this.connection.on('fileUpdated', this.onStreamDriveFileUpdated);
|
||||||
this.connection.on('file_deleted', this.onStreamDriveFileDeleted);
|
this.connection.on('fileDeleted', this.onStreamDriveFileDeleted);
|
||||||
this.connection.on('folder_created', this.onStreamDriveFolderCreated);
|
this.connection.on('folderCreated', this.onStreamDriveFolderCreated);
|
||||||
this.connection.on('folder_updated', this.onStreamDriveFolderUpdated);
|
this.connection.on('folderUpdated', this.onStreamDriveFolderUpdated);
|
||||||
|
|
||||||
if (this.initFolder) {
|
if (this.initFolder) {
|
||||||
this.cd(this.initFolder, true);
|
this.cd(this.initFolder, true);
|
||||||
|
@ -45,8 +45,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
// Delete
|
// Delete
|
||||||
await del(file);
|
await del(file);
|
||||||
|
|
||||||
// Publish file_deleted event
|
// Publish fileDeleted event
|
||||||
publishDriveStream(user._id, 'file_deleted', file._id);
|
publishDriveStream(user._id, 'fileDeleted', file._id);
|
||||||
|
|
||||||
res();
|
res();
|
||||||
});
|
});
|
||||||
|
@ -114,6 +114,6 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
// Response
|
// Response
|
||||||
res(fileObj);
|
res(fileObj);
|
||||||
|
|
||||||
// Publish file_updated event
|
// Publish fileUpdated event
|
||||||
publishDriveStream(user._id, 'file_updated', fileObj);
|
publishDriveStream(user._id, 'fileUpdated', fileObj);
|
||||||
});
|
});
|
||||||
|
@ -52,6 +52,6 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
// Response
|
// Response
|
||||||
res(folderObj);
|
res(folderObj);
|
||||||
|
|
||||||
// Publish folder_created event
|
// Publish folderCreated event
|
||||||
publishDriveStream(user._id, 'folder_created', folderObj);
|
publishDriveStream(user._id, 'folderCreated', folderObj);
|
||||||
});
|
});
|
||||||
|
@ -96,6 +96,6 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
// Response
|
// Response
|
||||||
res(folderObj);
|
res(folderObj);
|
||||||
|
|
||||||
// Publish folder_updated event
|
// Publish folderUpdated event
|
||||||
publishDriveStream(user._id, 'folder_updated', folderObj);
|
publishDriveStream(user._id, 'folderUpdated', folderObj);
|
||||||
});
|
});
|
||||||
|
@ -396,7 +396,7 @@ export default async function(
|
|||||||
pack(driveFile).then(packedFile => {
|
pack(driveFile).then(packedFile => {
|
||||||
// Publish driveFileCreated event
|
// Publish driveFileCreated event
|
||||||
publishMainStream(user._id, 'driveFileCreated', packedFile);
|
publishMainStream(user._id, 'driveFileCreated', packedFile);
|
||||||
publishDriveStream(user._id, 'file_created', packedFile);
|
publishDriveStream(user._id, 'fileCreated', packedFile);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 統計を更新
|
// 統計を更新
|
||||||
|
Loading…
Reference in New Issue
Block a user