vault backup: 2023-11-16 12:25:02
This commit is contained in:
		
							parent
							
								
									43e64a1533
								
							
						
					
					
						commit
						baeeaccf53
					
				
							
								
								
									
										8
									
								
								api.ts
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								api.ts
									
									
									
									
									
								
							| @ -55,6 +55,14 @@ router.get('/dseg_price/:billcode/:shipcode/:stlc/:dseg/:qty', async (ctx) => { | ||||
|     ctx.response.body = ag.guidance.finalPrice.Snapped; | ||||
| }); | ||||
| 
 | ||||
| // specific customres codes but generic style code and data segment to accomodate custom colors and branding
 | ||||
| router.get('/dseg_reason/:billcode/:shipcode/:stlc/:dseg/:qty', async (ctx) => { | ||||
|     const { billcode, shipcode, stlc, dseg, qty } = ctx.params; | ||||
|     const result = await client.queryObject({args: [billcode, shipcode, stlc, dseg, qty], text: query_dseg} ); | ||||
|     const ag = apply_guidance(result.rows[0]["doc"]); | ||||
|     ctx.response.body = ag.guidance.finalPrice.Reason; | ||||
| }); | ||||
| 
 | ||||
| app.use(router.routes()); | ||||
| app.use(router.allowedMethods()); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user