Reorient the order of the JSON keys for responses
This commit is contained in:
		
							parent
							
								
									5d88fb9acb
								
							
						
					
					
						commit
						2fca92c615
					
				
					 2 changed files with 7 additions and 6 deletions
				
			
		|  | @ -8,11 +8,11 @@ class Activity extends DBParser { | |||
| 	*/ | ||||
| 	constructor(ENTRY) { | ||||
| 		super(ENTRY, { | ||||
| 			"_id": "ID", | ||||
| 			"username": "username", | ||||
| 			"description": "description", | ||||
| 			"duration": "duration", | ||||
| 			"date": "date" | ||||
| 			"date": "date", | ||||
| 			"_id": "ID" | ||||
| 		}); | ||||
| 
 | ||||
| 		this.convert_date(); | ||||
|  | @ -27,7 +27,6 @@ class Activity extends DBParser { | |||
| 	convert_date(DATE) { | ||||
| 		if (DATE || this.data.date) { | ||||
| 			this.date = (new Date(DATE || this.data.date)).toDateString(); | ||||
| 
 | ||||
| 			return (this.date); | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| const DBParser = require(`./parser.JS`) | ||||
| 
 | ||||
| DBParser.Log = class Log extends DBParser { | ||||
| class Log extends DBParser { | ||||
| 	/* | ||||
| 		Clean the log information.  | ||||
| 	 | ||||
|  | @ -8,10 +8,12 @@ DBParser.Log = class Log extends DBParser { | |||
| 	*/ | ||||
| 	constructor(ENTRY) { | ||||
| 		super(ENTRY, { | ||||
| 			"_id": "ID", | ||||
| 			"username": "name", | ||||
| 			"count": "count", | ||||
| 			"_id": "ID", | ||||
| 			"log": "activities" | ||||
| 		}); | ||||
| 	}; | ||||
| } | ||||
| } | ||||
| 
 | ||||
| module.exports = Log; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue