forked from pact-foundation/pact-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt Fellows
committed
Oct 18, 2019
1 parent
dda1b80
commit f97b6bd
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package main | ||
|
||
import "github.com/gin-gonic/gin" | ||
import "github.com/pact-foundation/pact-go/examples/gin/provider" | ||
import ( | ||
"github.com/gin-gonic/gin" | ||
"github.com/pact-foundation/pact-go/examples/gin/provider" | ||
) | ||
|
||
func main() { | ||
router := gin.Default() | ||
router.POST("/login/:id", provider.UserLogin) | ||
router.POST("/users/:id", provider.IsAuthenticated(provider.GetUser)) | ||
router.POST("/users/:id", provider.IsAuthenticated(), provider.GetUser) | ||
router.Run("localhost:8080") | ||
} |