INNER CODE UNIT · Go

PostTag

cryptag/cryptag · servers/cryptag-webserver/main.go:398

func PostTag(w http.ResponseWriter, req *http.Request) {
	pair := &types.TagPair{}

	err := help.ReadInto(req.Body, pair)
	if err != nil {
		http.Error(w, "Error reading tag pair: "+err.Error(),
			http.StatusInternalServerError)
		return
	}

	err = filesystem.SaveTagPair(pair)
	if err != nil {
		help.WriteError(w, "Error saving TagPair: "+err.Error(),
			http.StatusInternalServerError)
		return
	}

	if types.Debug {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…