openclimatefix / quartz-frontend

Front End repo for the Nowcasting project.
https://openclimatefix.org/projects/nowcasting/
MIT License
103 stars 16 forks source link

Add UI tag to routes #373

Closed peterdudfield closed 1 year ago

peterdudfield commented 1 year ago

Detailed Description

Would we be able to add ?&UI tag to the routes. This will help in the database know which API calls are coming from the UI and which are coming directly to the API.

Context

-- useufl to know which api calls are coming from where

Possible Implementation

add &UI to the routes, this wont do anything but will show up in

select * from (select distinct on (url, email) * from api_request
join "user" on user_uuid = "user".uuid
where url like '%national/forecast%'
               and email not like '%openclimatefix%'
order by url, email, created_utc desc) as anon_1
where created_utc > '2023-06-20'
order by created_utc desc