Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Kommentar: Impressum eingefügt

...

Codeblock
languagepy
themeMidnight
firstline25
linenumberstrue
	class ReleaseHelper(http.Controller):
    
    @http.route('/get_release_info/', auth='public')
    def get_release_info_no_input(self):
        """
            Simple handler for the case when somebody will try to call our function without code
            @retung: empty string
        """        
        return ""
    
    @http.route('/get_release_info/<string:code>', auth='public')
    def get_release_info(self, code):
        """
            This function will be called extern from releasemanager, gets code as input and returns laste release data
            @code: access code
            @return: last release or empty string if code not provided or wrong
        """        
                
        if code is None:
            return ""
        
        eq_servers = http.request.env['eq_servers.table'].sudo()
        records = eq_servers.search([('eq_access_code', '=', code)])
        if records:
            return records[0].eq_last_release
                        
        return ""

...


Info

Rechtliche Hinweise / Impressum