18 lines
		
	
	
		
			397 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			397 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package user
 | |
| 
 | |
| import (
 | |
| 	"net/http"
 | |
| 
 | |
| 	"tyc-server/app/main/api/internal/logic/user"
 | |
| 	"tyc-server/app/main/api/internal/svc"
 | |
| 	"tyc-server/common/result"
 | |
| )
 | |
| 
 | |
| func GetTokenHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
 | |
| 	return func(w http.ResponseWriter, r *http.Request) {
 | |
| 		l := user.NewGetTokenLogic(r.Context(), svcCtx)
 | |
| 		resp, err := l.GetToken()
 | |
| 		result.HttpResult(r, w, resp, err)
 | |
| 	}
 | |
| }
 |