Skip to content

changing API path #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
- cron: '0 0 * * 0'

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/galal/sqlrunner/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Controller {
EventBus bus;

@GET
@Path("/{file}")
@Path("/get/{file}")
@Blocking
public String runSql(@PathParam("file") String file, RoutingContext context) {
var queryParams =
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/org/galal/sqlrunner/test/SqlRunnerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void runSqlFileTest() {
.when()
.auth()
.basic(username, password)
.get("/sql/query_this.sql")
.get("/get/sql/query_this.sql")
.peek()
.then()
.statusCode(200)
Expand All @@ -57,7 +57,7 @@ void fileContentCachingTest() {
.when()
.auth()
.basic(username, password)
.get("/sql/query_this.sql")
.get("/get/sql/query_this.sql")
.then()
.statusCode(200)
.body(jsonEquals(expectedJsonStr));
Expand All @@ -67,7 +67,7 @@ void fileContentCachingTest() {
.when()
.auth()
.basic(username, password)
.get("/sql/query_this.sql")
.get("/get/sql/query_this.sql")
.then()
.statusCode(200)
.body(jsonEquals(expectedJsonStr));
Expand All @@ -94,7 +94,7 @@ void runSqlFileWithParamsTest() {
.auth()
.basic(username, password)
.queryParam("brand_name", "BMW")
.get("/sql/query_with_params.sql")
.get("/get/sql/query_with_params.sql")
.peek()
.then()
.statusCode(200)
Expand All @@ -114,7 +114,7 @@ void runSqlFileWithNullParamsTest() {
.auth()
.basic(username, password)
.queryParam("brand_name")
.get("/sql/query_with_params.sql")
.get("/get/sql/query_with_params.sql")
.peek()
.then()
.statusCode(200)
Expand Down