Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
console.log('Arming drone!');
this.active = true;
this.sessionName = 'mock_name';
this.sessionID = UUID.UUID();
// this.droneName = 'Brendon Laptop';
}
setSesssion( obj ) {
private addListProperty(): void {
const writeJsonService: WriteJsonService = WriteJsonService.getInstance();
writeJsonService.patcher();
const uuid = UUID.UUID();
// this.properties.push(new EventPropertyList(uuid));
}
if (!this.controlName) {
throw new Error('required input parameter is missing for FormElementComponent');
}
if (!this.formControl) {
throw new Error(
`input parameter with value '${this.getControlName()}' does not exist in the given form for FormElementComponent`
);
}
if (Array.isArray(this.controlName) && this.formControlArray.some(el => !el)) {
throw new Error(
`one of the input parameter do not exist in the given form for FormElementComponent`
);
}
this.uuid = UUID.UUID(); // uuid to make the id of the control unique
}
it('should return player config without courseId', () => {
const playerService = TestBed.get(PublicPlayerService);
const userService = TestBed.get(UserService);
userService._anonymousSid = UUID.UUID();
userService._userId = 'anonymous';
userService._channel = 'in.ekstep';
userService._appId = 'd5773f35773feab';
const PlayerMeta = {
contentId: serverRes.successResult.result.content.identifier,
contentData: serverRes.successResult.result.content
};
const playerConfig = playerService.getConfig(PlayerMeta);
expect(playerConfig).toBeTruthy();
expect(playerConfig.context.contentId).toContain('domain_66675');
});
});
addToQueue(attendeeQueue: AttendeeQueue) {
this.db.put({
_id: UUID.UUID(),
event_id: attendeeQueue.event_id,
attendee: attendeeQueue.attendee
}).then(function (response) {
console.log(response)
}).catch(function (err) {
console.log(err);
});
}
public addPrimitiveProperty(): void {
console.log('called primitive');
const uuid: string = UUID.UUID();
const parent: EventProperty = this.eventPropertyNested;
this.eventPropertyNested.eventProperties.push(new EventPropertyPrimitive(uuid, parent));
}
import { TangerineFormCard } from './tangerine-form-card';
import { UUID } from 'angular2-uuid';
export class TangerineFormSession {
_id: string = UUID.UUID();
formId = '';
model = {};
constructor(session?) {
if (session) {
Object.assign(this, session);
}
}
}
public interceptBefore(request:InterceptedRequest):InterceptedRequest {
/**
* For every request to the server, that the service id, or resource id is sent in the URL, need to pass UUID in the header.
* Check if the unique id exists in uuidMap, and if so get the UUID and add it to the header.
*/
request.options.headers.append(this.cookieService.getUserIdSuffix(), this.cookieService.getUserId());
request.options.withCredentials = true;
var uuidValue = this.getUuidValue(request.url);
if (uuidValue != '') {
request.options.headers.set('X-ECOMP-ServiceID', uuidValue);
}
request.options.headers.set('X-ECOMP-RequestID', UUID.UUID());
return request;
}
private generateChartName(): string {
return UUID.UUID();
}
constructor(private core:CoreService, public themeService:ThemeService) {
super();
this.controlUid = "chart_" + UUID.UUID();
this.legendEvents = new BehaviorSubject({xHTML:''});
this.legendLabels = new BehaviorSubject([]);
this.legendAnalytics = new BehaviorSubject([]);
}