@@ -110,7 +110,7 @@ func (r *AssignDeviceToSiteResource) Create(ctx context.Context, req resource.Cr
110
110
body := plan .toBody (ctx , AssignDeviceToSite {})
111
111
112
112
params := ""
113
- res , err := r .client .Post (plan .getPath ()+ params , body )
113
+ res , err := r .client .Post (plan .getPath ()+ params , body , cc . UseMutex )
114
114
if err != nil {
115
115
resp .Diagnostics .AddError ("Client Error" , fmt .Sprintf ("Failed to configure object (%s), got error: %s, %s" , "POST" , err , res .String ()))
116
116
return
@@ -222,7 +222,7 @@ func (r *AssignDeviceToSiteResource) Update(ctx context.Context, req resource.Up
222
222
}
223
223
body , _ = sjson .Set (body , "siteId" , plan .SiteId .ValueString ())
224
224
225
- res , err := r .client .Post (plan .getPath (), body )
225
+ res , err := r .client .Post (plan .getPath (), body , cc . UseMutex )
226
226
if err != nil {
227
227
resp .Diagnostics .AddError ("Client Error" , fmt .Sprintf ("Failed to configure object (POST), got error: %s, %s" , err , res .String ()))
228
228
return
@@ -237,9 +237,9 @@ func (r *AssignDeviceToSiteResource) Update(ctx context.Context, req resource.Up
237
237
body , _ = sjson .Set (body , fmt .Sprintf ("deviceIds.%d" , i ), id )
238
238
}
239
239
240
- res , err := r .client .Post (plan .getPathDelete (), body )
240
+ res , err := r .client .Post (plan .getPathDelete (), body , cc . UseMutex )
241
241
if err != nil {
242
- resp .Diagnostics .AddError ("Client Error" , fmt .Sprintf ("Failed to configure object (POST ), got error: %s, %s" , err , res .String ()))
242
+ resp .Diagnostics .AddError ("Client Error" , fmt .Sprintf ("Failed to configure object (POST2 ), got error: %s, %s" , err , res .String ()))
243
243
return
244
244
}
245
245
tflog .Debug (ctx , fmt .Sprintf ("Device removed: %s" , removed ))
@@ -265,7 +265,7 @@ func (r *AssignDeviceToSiteResource) Delete(ctx context.Context, req resource.De
265
265
266
266
body := state .toBody (ctx , state )
267
267
params := ""
268
- res , err := r .client .Post (state .getPathDelete ()+ params , body )
268
+ res , err := r .client .Post (state .getPathDelete ()+ params , body , cc . UseMutex )
269
269
if err != nil {
270
270
resp .Diagnostics .AddError ("Client Error" , fmt .Sprintf ("Failed to configure object (POST), got error: %s, %s" , err , res .String ()))
271
271
return
0 commit comments