<commit_before>'use strict';

module.exports = {

  controller: function (args) {
    this.salvar = args.salvar;

    this.login = m.request({
      method: 'GET',
      url: '/editar/api/usuario'
    }).then(function (data) {
      return data.username;
    });

  },

  view: function (ctrl) {
    return m('header', {
      style: {
        height: '0px'
      }
    }, [
      m('', [
        m('.ferramentas', [
          m('button.inline.debug', {
            onclick: ctrl.salvar.bind(ctrl)
          }, [
            m('i.fa.fa-save')
          ]),
        ]),

        m('.titulo', m('h1', 'Editor de Serviços')),

        m('#logout', [
          m('span', [' ', ctrl.login(), ' ']),
          m('button', [
            m('i.fa.fa-sign-out'), m.trust('&nbsp; Sair'),
          ])
        ])
      ]),
    ]);
  }

};
<commit_msg>Logout funcionando<commit_after>'use strict';

module.exports = {

  controller: function (args) {
    this.salvar = args.salvar;

    this.login = m.request({
      method: 'GET',
      url: '/editar/api/usuario'
    }).then(function (data) {
      return data.username;
    });

  },

  view: function (ctrl) {
    return m('header', {
      style: {
        height: '0px'
      }
    }, [
      m('', [
        m('.ferramentas', [
          m('button.inline.debug', {
            onclick: ctrl.salvar.bind(ctrl)
          }, [
            m('i.fa.fa-save')
          ]),
        ]),

        m('.titulo', m('h1', 'Editor de Serviços')),

        m('form#logout[action=/editar/logout][method=POST]', [
          m('span', [' ', ctrl.login(), ' ']),
          m('button', [
            m('i.fa.fa-sign-out'), m.trust('&nbsp; Sair'),
          ])
        ])
      ]),
    ]);
  }

};

{'fraction_non_alphanumeric': 0.2077771329077191, 'fraction_numerical': 0.0023215322112594312, 'mean_word_length': 1.5808383233532934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6261817', 'n_tokens_mistral': 611, 'n_tokens_neox': 588, 'n_words': 89}