UNPKG

waw-dev

Version:

[waw](https://webart.work) is the open-source web, mobile and desktop app development framework that makes it easy to build top quality web apps with web technologies.

27 lines (25 loc) 559 B
import { Injectable } from '@angular/core'; import { MongoService } from 'wacom'; @Injectable({ providedIn: 'root' }) export class CNAMEService { public NAMEs: any = []; public _NAMEs: any = {}; constructor(private mongo: MongoService) { this.NAMEs = mongo.get('NAME', (arr, obj) => { this._NAMEs = obj; }); } create(NAME) { this.mongo.create('NAME', NAME); } update(NAME) { this.mongo.afterWhile(NAME, ()=> { this.mongo.update('NAME', NAME); }); } delete(NAME) { this.mongo.delete('NAME', NAME); } }