This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 74d6bd012d37c0ecb773e80383586b211d454931 Author: Daniel Gruno <[email protected]> AuthorDate: Sun Sep 6 19:17:58 2020 +0200 add pminfo endpoint --- server/endpoints/pminfo.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/server/endpoints/pminfo.py b/server/endpoints/pminfo.py new file mode 100644 index 0000000..21bf996 --- /dev/null +++ b/server/endpoints/pminfo.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Simple endpoint that returns the server's gathered activity data""" + +import plugins.server + + +async def process( + server: plugins.server.BaseServer, session: dict, indata: dict +) -> dict: + return server.data.activity + + +def register(server: plugins.server.BaseServer): + return plugins.server.Endpoint(process)
