mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
Prune dead code.
This commit is contained in:
parent
b22546f537
commit
248b91bc07
|
@ -467,39 +467,6 @@ public class PitchController extends Controller {
|
|||
return result;
|
||||
} // oembed action
|
||||
|
||||
/*
|
||||
* Raw returns file content identified by path.
|
||||
*/
|
||||
public CompletionStage<Result> raw(String grs,
|
||||
String user,
|
||||
String repo,
|
||||
String branch,
|
||||
String path) {
|
||||
|
||||
PitchParams pp =
|
||||
PitchParams.build(grsOnCall(grs), user, repo, branch);
|
||||
log.debug("raw: pp={}, path={}", pp, path);
|
||||
|
||||
String offline = request().getQueryString("offline");
|
||||
log.debug("raw: pp={}, path={}, offline={}", pp, path, offline != null);
|
||||
|
||||
Optional<File> fileo = pitchService.raw(pp, path);
|
||||
|
||||
if (fileo.isPresent()) {
|
||||
|
||||
log.debug("raw: pp={}, path={} file is found.");
|
||||
File file = fileo.get();
|
||||
return CompletableFuture.completedFuture(ok(file));
|
||||
|
||||
} else {
|
||||
|
||||
log.debug("raw: pp={}, path={} file not found.");
|
||||
return CompletableFuture.completedFuture(notFound());
|
||||
|
||||
}
|
||||
|
||||
} // raw action
|
||||
|
||||
/*
|
||||
* Determine GRS on call, explicitly defined or default.
|
||||
*/
|
||||
|
|
|
@ -8,9 +8,6 @@ GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset
|
|||
# Serve GitPitch oEmbed provider responses.
|
||||
GET /pitchme/oembed com.gitpitch.controllers.PitchController.oembed(url:String, format:String ?= null, width:String ?= null, height:String ?= null, maxwidth:String ?= null, maxheight:String ?= null, referrer:String ?= null)
|
||||
|
||||
# Serve GitPitch raw file content.
|
||||
GET /pitchme/raw/:grs/:user/:repo/:b/*path com.gitpitch.controllers.PitchController.raw(grs: String, user: String, repo: String, b: String, path: String)
|
||||
|
||||
# Serve GitPitch GIST iFrame for {gid}.
|
||||
GET /pitchme/gist/:gid com.gitpitch.controllers.PitchController.gist(gid:String)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user