Skip to content

Commit

Permalink
updating name of endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mletter1 committed Jan 24, 2024
1 parent 235eee1 commit b64a593
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/slycat/web/server/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def abspath(path):
dispatcher.connect("get-project-data-in-model", "/projects/data/model/:mid", slycat.web.server.handlers.get_project_data_in_model, conditions={"method": ["GET"]})
dispatcher.connect("get-project-file-names", "/projects/:pid/name", slycat.web.server.handlers.get_project_file_names, conditions={"method": ["GET"]})
dispatcher.connect("get-project-data-parameter", "/projects/data/:did/parameters/:param", slycat.web.server.handlers.get_project_data_parameter, conditions={"method": ["GET"]})
dispatcher.connect("get-last-active-time", "/server/last_active_time", slycat.web.server.handlers.get_last_active_time, conditions={"method": ["GET"]})
dispatcher.connect("get-is-user-currently-active", "/server/is-user-currently-active", slycat.web.server.handlers.is_user_currently_active, conditions={"method": ["GET"]})
dispatcher.connect("get-remote-file", "/remotes/:hostname/file{path:.*}", slycat.web.server.handlers.get_remote_file, conditions={"method" : ["GET"]})
dispatcher.connect("get-remote-image", "/remotes/:hostname/image{path:.*}", slycat.web.server.handlers.get_remote_image, conditions={"method" : ["GET"]})
dispatcher.connect("get-remote-video", "/remotes/:hostname/videos/:vsid", slycat.web.server.handlers.get_remote_video, conditions={"method" : ["GET"]})
Expand Down
2 changes: 1 addition & 1 deletion packages/slycat/web/server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def require_integer_parameter(value, name):
raise cherrypy.HTTPError("400 '%s' parameter must be an integer." % name)

@cherrypy.tools.json_out(on=True)
def get_last_active_time():
def is_user_currently_active():
"""
Checks when the most recent session activity occurred.
If it occurred more than 10 minutes ago, returns true.
Expand Down
4 changes: 2 additions & 2 deletions web-server/js/slycat-web-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,8 @@ module.get_model_command_fetch = async function (params, errorFunction) {
});
};

module.get_last_active_time_fetch = async function () {
return fetch(`${api_root}server/last_active_time`, {
module.get_is_user_currently_active = async function () {
return fetch(`${api_root}server/is-user-currently-active`, {
credentials: 'same-origin',
cache: 'no-store',
dataType: 'json'
Expand Down

0 comments on commit b64a593

Please sign in to comment.