@@ -189,7 +189,7 @@ module.exports = {
189189 *
190190 * @param {ResolverObj } _obj
191191 * @param {string } id - project id
192- * @param {Object } rateLimitSettings - rate limit settings
192+ * @param {Object | null } rateLimitSettings - rate limit settings (null to remove)
193193 * @param {UserInContext } user - current authorized user {@see ../index.js}
194194 * @param {ContextFactories } factories - factories for working with models
195195 *
@@ -208,41 +208,13 @@ module.exports = {
208208
209209 try {
210210 return project . updateProject ( {
211- rateLimitSettings,
211+ rateLimitSettings : rateLimitSettings || null ,
212212 } ) ;
213213 } catch ( err ) {
214214 throw new ApolloError ( 'Something went wrong' ) ;
215215 }
216216 } ,
217217
218- /**
219- * Remove project rate limits settings
220- *
221- * @param {ResolverObj } _obj
222- * @param {string } id - project id
223- * @param {UserInContext } user - current authorized user {@see ../index.js}
224- * @param {ContextFactories } factories - factories for working with models
225- *
226- * @returns {Project }
227- */
228- async removeProjectRateLimits ( _obj , { id } , { user, factories } ) {
229- const project = await factories . projectsFactory . findById ( id ) ;
230-
231- if ( ! project ) {
232- throw new ApolloError ( 'There is no project with that id' ) ;
233- }
234-
235- if ( project . workspaceId . toString ( ) === '6213b6a01e6281087467cc7a' ) {
236- throw new ApolloError ( 'Unable to update demo project' ) ;
237- }
238-
239- try {
240- return project . updateProject ( null , { rateLimitSettings : '' } ) ;
241- } catch ( err ) {
242- throw new ApolloError ( 'Something went wrong' ) ;
243- }
244- } ,
245-
246218 /**
247219 * Generates new project integration token by id
248220 *
0 commit comments