Skip to content

Commit 45b317b

Browse files
author
Rick Saccoccia
committed
[service] Add IdentityManager to ObservationSender construction
1 parent 041f96c commit 45b317b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

plugins/arcgis/service/src/FeatureLayerProcessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class FeatureLayerProcessor {
4747
this.lastTimeStamp = 0;
4848
this.featureQuerier = new FeatureQuerier(layerInfo, config, identityManager,console);
4949
this._binner = new ObservationBinner(layerInfo, this.featureQuerier, config);
50-
this.sender = new ObservationsSender(layerInfo, config, console);
50+
this.sender = new ObservationsSender(layerInfo, config, identityManager, console);
5151
}
5252

5353
/**

plugins/arcgis/service/src/ObservationsSender.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import environment from '@ngageoint/mage.service/lib/environment/env'
99
import fs from 'fs'
1010
import path from 'path'
1111
import FormData from 'form-data';
12+
import { ArcGISIdentityManager, request } from "@esri/arcgis-rest-request"
1213

1314
/**
1415
* Class that transforms observations into a json string that can then be sent to an arcgis server.
@@ -50,20 +51,23 @@ export class ObservationsSender {
5051
*/
5152
private _config: ArcGISPluginConfig;
5253

54+
private _identityManager: ArcGISIdentityManager;
55+
5356
/**
5457
* Constructor.
5558
* @param layerInfo The layer info.
5659
* @param config The plugins configuration.
5760
* @param console Used to log to the console.
5861
*/
59-
constructor(layerInfo: LayerInfo, config: ArcGISPluginConfig, console: Console) {
62+
constructor(layerInfo: LayerInfo, config: ArcGISPluginConfig, identityManager: ArcGISIdentityManager, console: Console) {
6063
this._url = layerInfo.url;
6164
this._urlAdd = this._url + '/addFeatures';
6265
this._urlUpdate = this._url + '/updateFeatures';
6366
this._console = console;
6467
this._httpClient = new HttpClient(console, layerInfo.token);
6568
this._attachmentDirectory = environment.attachmentBaseDirectory;
6669
this._config = config;
70+
this._identityManager = identityManager;
6771
}
6872

6973
/**

0 commit comments

Comments
 (0)