[BREAK] Remove deprecated endpoints (#23162)
parent
485d403dbf
commit
d2f70b9e41
@ -1,17 +0,0 @@ |
||||
import { Meteor } from 'meteor/meteor'; |
||||
|
||||
import { getFullUserData } from '../functions'; |
||||
|
||||
Meteor.methods({ |
||||
getFullUserData({ filter = '', username = '', limit = 1 }) { |
||||
console.warn('Method "getFullUserData" is deprecated and will be removed after v4.0.0'); |
||||
|
||||
if (!Meteor.userId()) { |
||||
throw new Meteor.Error('not-authorized'); |
||||
} |
||||
|
||||
const result = getFullUserData({ userId: Meteor.userId(), filter: filter || username, limit }); |
||||
|
||||
return result && result.fetch(); |
||||
}, |
||||
}); |
||||
@ -1,14 +0,0 @@ |
||||
import { Meteor } from 'meteor/meteor'; |
||||
|
||||
import { Info } from '../../../utils'; |
||||
|
||||
Meteor.methods({ |
||||
getServerInfo() { |
||||
if (!Meteor.userId()) { |
||||
console.warning('Method "getServerInfo" is deprecated and will be removed after v4.0.0'); |
||||
throw new Meteor.Error('not-authorized'); |
||||
} |
||||
|
||||
return Info; |
||||
}, |
||||
}); |
||||
@ -1,21 +0,0 @@ |
||||
import { Meteor } from 'meteor/meteor'; |
||||
|
||||
import { hasPermission } from '../../../authorization'; |
||||
import { LivechatBusinessHours } from '../../../models/server/raw'; |
||||
|
||||
Meteor.methods({ |
||||
'livechat:saveOfficeHours'(day, start, finish, open) { |
||||
console.warn('Method "livechat:saveOfficeHour" is deprecated and will be removed after v4.0.0'); |
||||
|
||||
if (!Meteor.userId() || !hasPermission(Meteor.userId(), 'view-livechat-business-hours')) { |
||||
throw new Meteor.Error('error-not-allowed', 'Not allowed', { method: 'livechat:saveOfficeHours' }); |
||||
} |
||||
|
||||
LivechatBusinessHours.updateDayOfGlobalBusinessHour({ |
||||
day, |
||||
start, |
||||
finish, |
||||
open, |
||||
}); |
||||
}, |
||||
}); |
||||
Loading…
Reference in new issue