Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit d3a4fa8

Browse files
committed
fix stray using, functions on new line to make syntax-checker happy
1 parent fbae578 commit d3a4fa8

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/assessment/criteria.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ using StructTypes
55

66
import Rasters: Between
77
using CairoMakie, ImageIO, Images
8-
using
98

109
include("tiles.jl")
1110

@@ -100,7 +99,8 @@ end
10099
function setup_region_routes(config, auth)
101100
reg_assess_data = setup_regional_data(config)
102101

103-
@get("/assess/{reg}/{rtype}", middleware=[auth]) function (req::Request, reg::String, rtype::String)
102+
@get("/assess/{reg}/{rtype}", middleware=[auth])
103+
function (req::Request, reg::String, rtype::String)
104104
qp = queryparams(req)
105105
file_id = string(hash(qp))
106106
mask_temp_path = _cache_location(config)
@@ -155,13 +155,15 @@ function setup_region_routes(config, auth)
155155
return file(mask_path)
156156
end
157157

158-
@get("/bounds/{reg}", middleware=[auth]) function (req::Request, reg::String)
158+
@get("/bounds/{reg}", middleware=[auth])
159+
function (req::Request, reg::String)
159160
rst_stack = reg_assess_data[reg].stack
160161

161162
return json(Rasters.bounds(rst_stack))
162163
end
163164

164-
@get("/tile/{z}/{x}/{y}",middleware=[auth]) function (req::Request, z::Int64, x::Int64, y::Int64)
165+
@get("/tile/{z}/{x}/{y}",middleware=[auth])
166+
function (req::Request, z::Int64, x::Int64, y::Int64)
165167
# http://127.0.0.1:8000/tile/10/10/10?region=Cairns-Cooktown&rtype=slopes&criteria_names=Depth,Slope,Rugosity&lb=-9.0,0.0,0.0&ub=-2.0,40.0,0.0
166168
qp = queryparams(req)
167169
file_id = string(hash(qp))
@@ -260,7 +262,8 @@ function setup_region_routes(config, auth)
260262
end
261263

262264
# Parse the form data and return it
263-
@post("/form", middleware=[auth]) function(req)
265+
@post("/form", middleware=[auth])
266+
function(req)
264267
data = formdata(req)
265268
return data
266269
end

src/assessment/tiles.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,14 @@ function masked_nearest(
157157
end
158158

159159
function setup_tile_routes(auth)
160-
@get("/to-tile/{zoom}/{lon}/{lat}", middleware=[auth]) function (req::Request, zoom::Int64, lon::Float64, lat::Float64)
160+
@get("/to-tile/{zoom}/{lon}/{lat}", middleware=[auth])
161+
function (req::Request, zoom::Int64, lon::Float64, lat::Float64)
161162
x, y = _lon_lat_to_tile(zoom, lon, lat)
162163
return json(Dict(:x=>x, :y=>y))
163164
end
164165

165-
@get("/to-lonlat/{zoom}/{x}/{y}", middleware=[auth]) function (req::Request, zoom::Int64, x::Int64, y::Int64)
166+
@get("/to-lonlat/{zoom}/{x}/{y}", middleware=[auth])
167+
function (req::Request, zoom::Int64, x::Int64, y::Int64)
166168
lon_min, lon_max, lat_max, lat_min = _tile_bounds(zoom, x, y)
167169
return json(
168170
Dict(

0 commit comments

Comments
 (0)