feat: initial steps towards an independent worldState (#213)
This commit is contained in:
		
							parent
							
								
									61450b04bb
								
							
						
					
					
						commit
						722b496176
					
				@ -1,10 +1,13 @@
 | 
				
			|||||||
import { RequestHandler } from "express";
 | 
					import { RequestHandler } from "express";
 | 
				
			||||||
import worldState from "@/static/fixed_responses/worldState.json";
 | 
					import worldState from "@/static/fixed_responses/worldState.json";
 | 
				
			||||||
 | 
					import config from "@/config.json";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const worldStateController: RequestHandler = (_req, res) => {
 | 
					const worldStateController: RequestHandler = (_req, res) => {
 | 
				
			||||||
    const state = worldState;
 | 
					    res.json({
 | 
				
			||||||
    state.Time = Math.round(Date.now() / 1000);
 | 
					        ...worldState,
 | 
				
			||||||
    res.json(state);
 | 
					        BuildLabel: config.buildLabel,
 | 
				
			||||||
 | 
					        Time: Math.round(Date.now() / 1000)
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export { worldStateController };
 | 
					export { worldStateController };
 | 
				
			||||||
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user