局域网不可以使用域名
This commit is contained in:
parent
8a9fd7d4c0
commit
421b377785
|
@ -97,7 +97,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
# http.request(req)
|
# http.request(req)
|
||||||
# end
|
# end
|
||||||
|
|
||||||
uri = URI('http://test.gitlab.trustie.net/api/questions.json')
|
uri = URI('http://192.168.80.21:8080/api/questions.json')
|
||||||
body = question.to_json
|
body = question.to_json
|
||||||
res = Net::HTTP.new(uri.host, uri.port).start do |client|
|
res = Net::HTTP.new(uri.host, uri.port).start do |client|
|
||||||
request = Net::HTTP::Post.new(uri.path)
|
request = Net::HTTP::Post.new(uri.path)
|
||||||
|
|
|
@ -121,7 +121,7 @@ class StudentWorkController < ApplicationController
|
||||||
|
|
||||||
if stundet_work.save
|
if stundet_work.save
|
||||||
if @homework.homework_type == 2 && @homework.homework_detail_programing #编程作业,学生提交作品后计算系统得分
|
if @homework.homework_type == 2 && @homework.homework_detail_programing #编程作业,学生提交作品后计算系统得分
|
||||||
url = "http://test.gitlab.trustie.net/api/questions/#{@homework.homework_detail_programing.question_id}/solutions.json"
|
url = "http://192.168.80.21:8080/api/questions/#{@homework.homework_detail_programing.question_id}/solutions.json"
|
||||||
solutions = {
|
solutions = {
|
||||||
stundet_work_id:stundet_work.id,
|
stundet_work_id:stundet_work.id,
|
||||||
src:stundet_work.description,
|
src:stundet_work.description,
|
||||||
|
|
Loading…
Reference in New Issue