def api_get_contacts() -> Response: ''' Get the contacts list. ''' contacts = [contact.to_dict() for contact in get_contacts()] return jsonify(contacts=contacts)
def get_contacts_page(): contacts = list(get_contacts(with_id=True)) contacts = sorted(contacts, key=lambda c: c[1] or '') return render_template( 'contacts.html', contacts=contacts, **_get_render_data(), )
def get_send_reply(uid): if DEBUG: reply = SEND_WINDOW_DATA.get(uid) else: reply = SEND_WINDOW_DATA.pop(uid, None) if not reply: abort(404, 'Reply message not found!') return render_template( 'send.html', reply=reply, contacts=list(get_contacts()), **_get_render_data(), )
def get_send(): return render_template( 'send.html', contacts=list(get_contacts()), **_get_render_data(), )