mirror of
https://github.com/wahyd4/Libr.git
synced 2026-08-09 04:46:07 +10:00
add weixin controler for verify weixin
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
||||
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the wei_xin controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
@@ -0,0 +1,7 @@
|
||||
class WeiXinController < ApplicationController
|
||||
|
||||
def verify
|
||||
echo_str = params[:echostr]
|
||||
render text:echo_str
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,2 @@
|
||||
module WeiXinHelper
|
||||
end
|
||||
@@ -39,6 +39,10 @@ Libr::Application.routes.draw do
|
||||
post 'api/books/borrow' =>'api#borrow_book'
|
||||
|
||||
|
||||
#for weixin
|
||||
get 'wx/verify' =>'wei_xin#verify'
|
||||
|
||||
|
||||
# The priority is based upon order of creation:
|
||||
# first created -> highest priority.
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe WeiXinController do
|
||||
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
# Specs in this file have access to a helper object that includes
|
||||
# the WeiXinHelper. For example:
|
||||
#
|
||||
# describe WeiXinHelper do
|
||||
# describe "string concat" do
|
||||
# it "concats two strings with spaces" do
|
||||
# helper.concat_strings("this","that").should == "this that"
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
describe WeiXinHelper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
Reference in New Issue
Block a user